OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef RemoteObjectId_h | 5 #ifndef RemoteObjectId_h |
6 #define RemoteObjectId_h | 6 #define RemoteObjectId_h |
7 | 7 |
| 8 #include "platform/inspector_protocol/String16.h" |
8 #include "wtf/PassOwnPtr.h" | 9 #include "wtf/PassOwnPtr.h" |
9 #include "wtf/text/WTFString.h" | |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 namespace protocol { | 13 namespace protocol { |
14 class DictionaryValue; | 14 class DictionaryValue; |
15 } | 15 } |
16 | 16 |
17 class RemoteObjectIdBase { | 17 class RemoteObjectIdBase { |
18 public: | 18 public: |
19 int contextId() const { return m_injectedScriptId; } | 19 int contextId() const { return m_injectedScriptId; } |
20 | 20 |
21 protected: | 21 protected: |
22 RemoteObjectIdBase(); | 22 RemoteObjectIdBase(); |
23 ~RemoteObjectIdBase() { } | 23 ~RemoteObjectIdBase() { } |
24 | 24 |
25 PassOwnPtr<protocol::DictionaryValue> parseInjectedScriptId(const String&); | 25 PassOwnPtr<protocol::DictionaryValue> parseInjectedScriptId(const String16&)
; |
26 | 26 |
27 int m_injectedScriptId; | 27 int m_injectedScriptId; |
28 }; | 28 }; |
29 | 29 |
30 class RemoteObjectId final : public RemoteObjectIdBase { | 30 class RemoteObjectId final : public RemoteObjectIdBase { |
31 public: | 31 public: |
32 static PassOwnPtr<RemoteObjectId> parse(const String&); | 32 static PassOwnPtr<RemoteObjectId> parse(const String16&); |
33 ~RemoteObjectId() { } | 33 ~RemoteObjectId() { } |
34 int id() const { return m_id; } | 34 int id() const { return m_id; } |
35 | 35 |
36 private: | 36 private: |
37 RemoteObjectId(); | 37 RemoteObjectId(); |
38 | 38 |
39 int m_id; | 39 int m_id; |
40 }; | 40 }; |
41 | 41 |
42 class RemoteCallFrameId final : public RemoteObjectIdBase { | 42 class RemoteCallFrameId final : public RemoteObjectIdBase { |
43 public: | 43 public: |
44 static PassOwnPtr<RemoteCallFrameId> parse(const String&); | 44 static PassOwnPtr<RemoteCallFrameId> parse(const String16&); |
45 ~RemoteCallFrameId() { } | 45 ~RemoteCallFrameId() { } |
46 | 46 |
47 int frameOrdinal() const { return m_frameOrdinal; } | 47 int frameOrdinal() const { return m_frameOrdinal; } |
48 | 48 |
49 private: | 49 private: |
50 RemoteCallFrameId(); | 50 RemoteCallFrameId(); |
51 | 51 |
52 int m_frameOrdinal; | 52 int m_frameOrdinal; |
53 }; | 53 }; |
54 | 54 |
55 } // namespace blink | 55 } // namespace blink |
56 | 56 |
57 #endif // !defined(RemoteObjectId_h) | 57 #endif // !defined(RemoteObjectId_h) |
OLD | NEW |