2
|
1 |
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
|
|
2 |
// Use of this source code is governed by a BSD-style license that can be
|
|
3 |
// found in the LICENSE file.
|
|
4 |
|
|
5 |
package org.chromium.sdk.internal.protocol.data;
|
|
6 |
|
|
7 |
import org.chromium.sdk.internal.protocol.FrameObject;
|
|
8 |
import org.chromium.sdk.internal.protocolparser.JsonProtocolParseException;
|
|
9 |
import org.chromium.sdk.internal.protocolparser.JsonSubtype;
|
|
10 |
import org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting;
|
|
11 |
import org.chromium.sdk.internal.protocolparser.JsonSubtypeCondition;
|
|
12 |
import org.chromium.sdk.internal.protocolparser.JsonType;
|
|
13 |
|
|
14 |
/**
|
|
15 |
* A serialized form of object when it is fully (though shallowly) described. Object always
|
|
16 |
* has a type and a handle. (See {@link FrameObject} as a case that makes it a bit more messy).
|
|
17 |
* <p>Gets serialized in mirror-delay.js,
|
|
18 |
* JSONProtocolSerializer.prototype.serialize_, main part.
|
|
19 |
*/
|
|
20 |
@JsonType(subtypesChosenManually=true)
|
|
21 |
public interface SomeHandle extends JsonSubtype<SomeSerialized> {
|
|
22 |
/**
|
|
23 |
* An integer "handle" of the object. Normally it is unique (for particular suspended-to-resumed
|
|
24 |
* period). Some auxiliary objects may have non-unique handles which should be negative.
|
|
25 |
*/
|
|
26 |
@JsonSubtypeCondition
|
|
27 |
long handle();
|
|
28 |
|
|
29 |
String type();
|
|
30 |
|
|
31 |
|
|
32 |
@JsonSubtypeCasting
|
|
33 |
ScriptHandle asScriptHandle() throws JsonProtocolParseException;
|
|
34 |
|
|
35 |
@JsonSubtypeCasting
|
|
36 |
ValueHandle asValueHandle() throws JsonProtocolParseException;
|
|
37 |
|
|
38 |
@JsonSubtypeCasting
|
|
39 |
ContextHandle asContextHandle() throws JsonProtocolParseException;
|
|
40 |
}
|