Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5)

Side by Side Diff: src/inspector/remote-object-id.h

Issue 2467853003: [inspector] migrate Runtime to new style (Closed)
Patch Set: addressed comments Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/inspector/injected-script-source.js ('k') | src/inspector/remote-object-id.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project 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 V8_INSPECTOR_REMOTEOBJECTID_H_ 5 #ifndef V8_INSPECTOR_REMOTEOBJECTID_H_
6 #define V8_INSPECTOR_REMOTEOBJECTID_H_ 6 #define V8_INSPECTOR_REMOTEOBJECTID_H_
7 7
8 #include "src/inspector/protocol/Forward.h" 8 #include "src/inspector/protocol/Forward.h"
9 9
10 namespace v8_inspector { 10 namespace v8_inspector {
11 11
12 using protocol::ErrorString; 12 using protocol::Response;
13 13
14 class RemoteObjectIdBase { 14 class RemoteObjectIdBase {
15 public: 15 public:
16 int contextId() const { return m_injectedScriptId; } 16 int contextId() const { return m_injectedScriptId; }
17 17
18 protected: 18 protected:
19 RemoteObjectIdBase(); 19 RemoteObjectIdBase();
20 ~RemoteObjectIdBase() {} 20 ~RemoteObjectIdBase() {}
21 21
22 std::unique_ptr<protocol::DictionaryValue> parseInjectedScriptId( 22 std::unique_ptr<protocol::DictionaryValue> parseInjectedScriptId(
23 const String16&); 23 const String16&);
24 24
25 int m_injectedScriptId; 25 int m_injectedScriptId;
26 }; 26 };
27 27
28 class RemoteObjectId final : public RemoteObjectIdBase { 28 class RemoteObjectId final : public RemoteObjectIdBase {
29 public: 29 public:
30 static std::unique_ptr<RemoteObjectId> parse(ErrorString*, const String16&); 30 static Response parse(const String16&, std::unique_ptr<RemoteObjectId>*);
31 ~RemoteObjectId() {} 31 ~RemoteObjectId() {}
32 int id() const { return m_id; } 32 int id() const { return m_id; }
33 33
34 private: 34 private:
35 RemoteObjectId(); 35 RemoteObjectId();
36 36
37 int m_id; 37 int m_id;
38 }; 38 };
39 39
40 class RemoteCallFrameId final : public RemoteObjectIdBase { 40 class RemoteCallFrameId final : public RemoteObjectIdBase {
41 public: 41 public:
42 static std::unique_ptr<RemoteCallFrameId> parse(ErrorString*, 42 static Response parse(const String16&, std::unique_ptr<RemoteCallFrameId>*);
43 const String16&);
44 ~RemoteCallFrameId() {} 43 ~RemoteCallFrameId() {}
45 44
46 int frameOrdinal() const { return m_frameOrdinal; } 45 int frameOrdinal() const { return m_frameOrdinal; }
47 46
48 static String16 serialize(int injectedScriptId, int frameOrdinal); 47 static String16 serialize(int injectedScriptId, int frameOrdinal);
49 48
50 private: 49 private:
51 RemoteCallFrameId(); 50 RemoteCallFrameId();
52 51
53 int m_frameOrdinal; 52 int m_frameOrdinal;
54 }; 53 };
55 54
56 } // namespace v8_inspector 55 } // namespace v8_inspector
57 56
58 #endif // V8_INSPECTOR_REMOTEOBJECTID_H_ 57 #endif // V8_INSPECTOR_REMOTEOBJECTID_H_
OLDNEW
« no previous file with comments | « src/inspector/injected-script-source.js ('k') | src/inspector/remote-object-id.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698