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

Unified Diff: src/inspector/RemoteObjectId.h

Issue 2292573002: [inspector] Initial import of v8_inspector. (Closed)
Patch Set: format the code, disable cpplint Created 4 years, 3 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/inspector/ProtocolPlatform.h ('k') | src/inspector/RemoteObjectId.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/RemoteObjectId.h
diff --git a/src/inspector/RemoteObjectId.h b/src/inspector/RemoteObjectId.h
new file mode 100644
index 0000000000000000000000000000000000000000..a32f568fb8ac0eb8768e00d98efc091d548c0144
--- /dev/null
+++ b/src/inspector/RemoteObjectId.h
@@ -0,0 +1,58 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_INSPECTOR_REMOTEOBJECTID_H_
+#define V8_INSPECTOR_REMOTEOBJECTID_H_
+
+#include "src/inspector/protocol/Forward.h"
+
+namespace v8_inspector {
+
+using protocol::ErrorString;
+
+class RemoteObjectIdBase {
+ public:
+ int contextId() const { return m_injectedScriptId; }
+
+ protected:
+ RemoteObjectIdBase();
+ ~RemoteObjectIdBase() {}
+
+ std::unique_ptr<protocol::DictionaryValue> parseInjectedScriptId(
+ const String16&);
+
+ int m_injectedScriptId;
+};
+
+class RemoteObjectId final : public RemoteObjectIdBase {
+ public:
+ static std::unique_ptr<RemoteObjectId> parse(ErrorString*, const String16&);
+ ~RemoteObjectId() {}
+ int id() const { return m_id; }
+
+ private:
+ RemoteObjectId();
+
+ int m_id;
+};
+
+class RemoteCallFrameId final : public RemoteObjectIdBase {
+ public:
+ static std::unique_ptr<RemoteCallFrameId> parse(ErrorString*,
+ const String16&);
+ ~RemoteCallFrameId() {}
+
+ int frameOrdinal() const { return m_frameOrdinal; }
+
+ static String16 serialize(int injectedScriptId, int frameOrdinal);
+
+ private:
+ RemoteCallFrameId();
+
+ int m_frameOrdinal;
+};
+
+} // namespace v8_inspector
+
+#endif // V8_INSPECTOR_REMOTEOBJECTID_H_
« no previous file with comments | « src/inspector/ProtocolPlatform.h ('k') | src/inspector/RemoteObjectId.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698