equal
deleted
inserted
replaced
|
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.protocolparser.JsonOptionalField; |
|
8 import org.chromium.sdk.internal.protocolparser.JsonOverrideField; |
|
9 import org.chromium.sdk.internal.protocolparser.JsonSubtype; |
|
10 import org.chromium.sdk.internal.protocolparser.JsonSubtypeCasting; |
|
11 import org.chromium.sdk.internal.protocolparser.JsonType; |
|
12 |
|
13 |
|
14 /** |
|
15 * A serialization of a JavaScript value. May be cast to {@link ObjectValueHandle} if value is |
|
16 * an object. |
|
17 * <p>Gets serialized in mirror-delay.js, |
|
18 * JSONProtocolSerializer.prototype.serialize_, main part |
|
19 */ |
|
20 @JsonType |
|
21 public interface ValueHandle extends JsonSubtype<SomeHandle> { |
|
22 @JsonOverrideField |
|
23 long handle(); |
|
24 |
|
25 String text(); |
|
26 |
|
27 @JsonOptionalField |
|
28 Object value(); |
|
29 |
|
30 @JsonOverrideField |
|
31 String type(); |
|
32 |
|
33 // for string type (the true length, value field may be truncated) |
|
34 @JsonOptionalField |
|
35 Long length(); |
|
36 @JsonOptionalField |
|
37 Long fromIndex(); |
|
38 @JsonOptionalField |
|
39 Long toIndex(); |
|
40 |
|
41 @JsonOptionalField |
|
42 String className(); |
|
43 |
|
44 @JsonSubtypeCasting |
|
45 ObjectValueHandle asObject(); |
|
46 |
|
47 @JsonSubtypeCasting |
|
48 void asNotObject(); |
|
49 } |
|
50 |