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

Side by Side Diff: src/inspector/InjectedScriptNative.h

Issue 2300823002: Revert of [inspector] Initial import of v8_inspector. (Closed)
Patch Set: 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
« no previous file with comments | « src/inspector/InjectedScript.cpp ('k') | src/inspector/InjectedScriptNative.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_
6 #define V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_
7
8 #include "src/inspector/protocol/Protocol.h"
9
10 #include <v8.h>
11 #include <vector>
12
13 namespace v8_inspector {
14
15 class InjectedScriptNative final {
16 public:
17 explicit InjectedScriptNative(v8::Isolate*);
18 ~InjectedScriptNative();
19
20 void setOnInjectedScriptHost(v8::Local<v8::Object>);
21 static InjectedScriptNative* fromInjectedScriptHost(v8::Local<v8::Object>);
22
23 int bind(v8::Local<v8::Value>, const String16& groupName);
24 void unbind(int id);
25 v8::Local<v8::Value> objectForId(int id);
26
27 void releaseObjectGroup(const String16& groupName);
28 String16 groupName(int objectId) const;
29
30 private:
31 void addObjectToGroup(int objectId, const String16& groupName);
32
33 int m_lastBoundObjectId;
34 v8::Isolate* m_isolate;
35 protocol::HashMap<int, std::unique_ptr<v8::Global<v8::Value>>> m_idToWrapped Object;
36 typedef protocol::HashMap<int, String16> IdToObjectGroupName;
37 IdToObjectGroupName m_idToObjectGroupName;
38 typedef protocol::HashMap<String16, std::vector<int>> NameToObjectGroup;
39 NameToObjectGroup m_nameToObjectGroup;
40 };
41
42 } // namespace v8_inspector
43
44 #endif // V8_INSPECTOR_INJECTEDSCRIPTNATIVE_H_
OLDNEW
« no previous file with comments | « src/inspector/InjectedScript.cpp ('k') | src/inspector/InjectedScriptNative.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698