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

Unified Diff: src/inspector/public/V8ContextInfo.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/public/StringView.h ('k') | src/inspector/public/V8Inspector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/inspector/public/V8ContextInfo.h
diff --git a/src/inspector/public/V8ContextInfo.h b/src/inspector/public/V8ContextInfo.h
new file mode 100644
index 0000000000000000000000000000000000000000..34a89af6e1fb8c22e96b0a80743b835f1c58a9bd
--- /dev/null
+++ b/src/inspector/public/V8ContextInfo.h
@@ -0,0 +1,46 @@
+// Copyright 2016 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_PUBLIC_V8CONTEXTINFO_H_
+#define V8_INSPECTOR_PUBLIC_V8CONTEXTINFO_H_
+
+#include "src/inspector/public/StringView.h"
+
+#include <v8.h>
+
+namespace v8_inspector {
+
+class V8ContextInfo {
+ public:
+ V8ContextInfo(v8::Local<v8::Context> context, int contextGroupId,
+ const StringView& humanReadableName)
+ : context(context),
+ contextGroupId(contextGroupId),
+ humanReadableName(humanReadableName),
+ hasMemoryOnConsole(false) {}
+
+ v8::Local<v8::Context> context;
+ // Each v8::Context is a part of a group. The group id is used to find
+ // appropriate
+ // V8DebuggerAgent to notify about events in the context.
+ // |contextGroupId| must be non-0.
+ int contextGroupId;
+ StringView humanReadableName;
+ StringView origin;
+ StringView auxData;
+ bool hasMemoryOnConsole;
+
+ private:
+ // Disallow copying and allocating this one.
+ enum NotNullTagEnum { NotNullLiteral };
+ void* operator new(size_t) = delete;
+ void* operator new(size_t, NotNullTagEnum, void*) = delete;
+ void* operator new(size_t, void*) = delete;
+ V8ContextInfo(const V8ContextInfo&) = delete;
+ V8ContextInfo& operator=(const V8ContextInfo&) = delete;
+};
+
+} // namespace v8_inspector
+
+#endif // V8_INSPECTOR_PUBLIC_V8CONTEXTINFO_H_
« no previous file with comments | « src/inspector/public/StringView.h ('k') | src/inspector/public/V8Inspector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698