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

Side by Side Diff: third_party/WebKit/Source/platform/v8_inspector/InspectedContext.h

Issue 2295913003: [DevTools] Switch from platform/v8_inspector to v8/v8-inspector.h. (Closed)
Patch Set: rebase 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 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 #ifndef InspectedContext_h
6 #define InspectedContext_h
7
8 #include "platform/v8_inspector/Allocator.h"
9 #include "platform/v8_inspector/String16.h"
10
11 #include <v8.h>
12
13 namespace v8_inspector {
14
15 class InjectedScript;
16 class InjectedScriptHost;
17 class V8ContextInfo;
18 class V8InspectorImpl;
19
20 class InspectedContext {
21 V8_INSPECTOR_DISALLOW_COPY(InspectedContext);
22 public:
23 ~InspectedContext();
24
25 v8::Local<v8::Context> context() const;
26 int contextId() const { return m_contextId; }
27 int contextGroupId() const { return m_contextGroupId; }
28 String16 origin() const { return m_origin; }
29 String16 humanReadableName() const { return m_humanReadableName; }
30 String16 auxData() const { return m_auxData; }
31
32 bool isReported() const { return m_reported; }
33 void setReported(bool reported) { m_reported = reported; }
34
35 v8::Isolate* isolate() const;
36 V8InspectorImpl* inspector() const { return m_inspector; }
37
38 InjectedScript* getInjectedScript() { return m_injectedScript.get(); }
39 void createInjectedScript();
40 void discardInjectedScript();
41
42 private:
43 friend class V8InspectorImpl;
44 InspectedContext(V8InspectorImpl*, const V8ContextInfo&, int contextId);
45 static void weakCallback(const v8::WeakCallbackInfo<InspectedContext>&);
46 static void consoleWeakCallback(const v8::WeakCallbackInfo<InspectedContext> &);
47
48 V8InspectorImpl* m_inspector;
49 v8::Global<v8::Context> m_context;
50 int m_contextId;
51 int m_contextGroupId;
52 const String16 m_origin;
53 const String16 m_humanReadableName;
54 const String16 m_auxData;
55 bool m_reported;
56 std::unique_ptr<InjectedScript> m_injectedScript;
57 v8::Global<v8::Object> m_console;
58 };
59
60 } // namespace v8_inspector
61
62 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698