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

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

Issue 1924713002: [DevTools] Removed InjectedScriptHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move-inspect-to-native
Patch Set: Created 4 years, 7 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium 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 V8InjectedScriptHost_h 5 #ifndef V8InjectedScriptHost_h
6 #define V8InjectedScriptHost_h 6 #define V8InjectedScriptHost_h
7 7
8 #include <v8.h> 8 #include <v8.h>
9 9
10 namespace blink { 10 namespace blink {
11 11
12 class InjectedScriptHost; 12 class V8DebuggerImpl;
13 class V8DebuggerClient; 13
14 // SECURITY NOTE: Although the InjectedScriptHost is intended for use solely by the inspector,
15 // a reference to the InjectedScriptHost may be leaked to the page being inspect ed. Thus, the
16 // InjectedScriptHost must never implemment methods that have more power over th e page than the
17 // page already has itself (e.g. origin restriction bypasses).
14 18
15 class V8InjectedScriptHost { 19 class V8InjectedScriptHost {
16 public: 20 public:
17 static v8::Local<v8::Object> wrap(v8::Local<v8::FunctionTemplate> constructo rTemplate, v8::Local<v8::Context>, InjectedScriptHost*); 21 // We expect that debugger outlives any JS context and thus V8InjectedScript Host (owned by JS)
18 static InjectedScriptHost* unwrap(v8::Local<v8::Context>, v8::Local<v8::Obje ct>); 22 // is destroyed before debugger.
19 static v8::Local<v8::FunctionTemplate> createWrapperTemplate(v8::Isolate*); 23 static v8::Local<v8::Object> create(v8::Local<v8::Context>, V8DebuggerImpl*) ;
20 24
25 private:
21 static void internalConstructorNameCallback(const v8::FunctionCallbackInfo<v 8::Value>&); 26 static void internalConstructorNameCallback(const v8::FunctionCallbackInfo<v 8::Value>&);
22 static void formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::V alue>&); 27 static void formatAccessorsAsProperties(const v8::FunctionCallbackInfo<v8::V alue>&);
23 static void isTypedArrayCallback(const v8::FunctionCallbackInfo<v8::Value>&) ; 28 static void isTypedArrayCallback(const v8::FunctionCallbackInfo<v8::Value>&) ;
24 static void subtypeCallback(const v8::FunctionCallbackInfo<v8::Value>&); 29 static void subtypeCallback(const v8::FunctionCallbackInfo<v8::Value>&);
25 static void generatorObjectDetailsCallback(const v8::FunctionCallbackInfo<v8 ::Value>&); 30 static void generatorObjectDetailsCallback(const v8::FunctionCallbackInfo<v8 ::Value>&);
26 static void collectionEntriesCallback(const v8::FunctionCallbackInfo<v8::Val ue>&); 31 static void collectionEntriesCallback(const v8::FunctionCallbackInfo<v8::Val ue>&);
27 static void getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8: :Value>&); 32 static void getInternalPropertiesCallback(const v8::FunctionCallbackInfo<v8: :Value>&);
28 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val ue>&); 33 static void getEventListenersCallback(const v8::FunctionCallbackInfo<v8::Val ue>&);
29 static void callFunctionCallback(const v8::FunctionCallbackInfo<v8::Value>&) ;
30 static void suppressWarningsAndCallFunctionCallback(const v8::FunctionCallba ckInfo<v8::Value>&); 34 static void suppressWarningsAndCallFunctionCallback(const v8::FunctionCallba ckInfo<v8::Value>&);
31 static void setNonEnumPropertyCallback(const v8::FunctionCallbackInfo<v8::Va lue>&); 35 static void setNonEnumPropertyCallback(const v8::FunctionCallbackInfo<v8::Va lue>&);
32 static void setFunctionVariableValueCallback(const v8::FunctionCallbackInfo< v8::Value>&); 36 static void setFunctionVariableValueCallback(const v8::FunctionCallbackInfo< v8::Value>&);
33 static void bindCallback(const v8::FunctionCallbackInfo<v8::Value>&); 37 static void bindCallback(const v8::FunctionCallbackInfo<v8::Value>&);
34 }; 38 };
35 39
36 } // namespace blink 40 } // namespace blink
37 41
38 #endif // V8InjectedScriptHost_h 42 #endif // V8InjectedScriptHost_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698