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

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

Issue 1767883002: DevTools: generate string16-based handlers for v8_inspector. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for landing 2 Created 4 years, 9 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 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 13 matching lines...) Expand all
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */ 28 */
29 29
30 #ifndef InjectedScriptHost_h 30 #ifndef InjectedScriptHost_h
31 #define InjectedScriptHost_h 31 #define InjectedScriptHost_h
32 32
33 #include "platform/inspector_protocol/Collections.h" 33 #include "platform/inspector_protocol/Collections.h"
34 #include "platform/inspector_protocol/String16.h"
34 #include "platform/v8_inspector/public/V8RuntimeAgent.h" 35 #include "platform/v8_inspector/public/V8RuntimeAgent.h"
35 #include "wtf/PassOwnPtr.h" 36 #include "wtf/PassOwnPtr.h"
36 #include "wtf/text/WTFString.h"
37 #include <v8.h> 37 #include <v8.h>
38 38
39 namespace blink { 39 namespace blink {
40 40
41 class V8EventListenerInfo; 41 class V8EventListenerInfo;
42 class V8DebuggerImpl; 42 class V8DebuggerImpl;
43 class V8DebuggerAgentImpl; 43 class V8DebuggerAgentImpl;
44 44
45 namespace protocol { 45 namespace protocol {
46 class DictionaryValue; 46 class DictionaryValue;
(...skipping 15 matching lines...) Expand all
62 62
63 void disconnect(); 63 void disconnect();
64 64
65 void addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspectable>); 65 void addInspectedObject(PassOwnPtr<V8RuntimeAgent::Inspectable>);
66 void clearInspectedObjects(); 66 void clearInspectedObjects();
67 V8RuntimeAgent::Inspectable* inspectedObject(unsigned num); 67 V8RuntimeAgent::Inspectable* inspectedObject(unsigned num);
68 68
69 void inspectImpl(PassOwnPtr<protocol::Value> objectToInspect, PassOwnPtr<pro tocol::Value> hints); 69 void inspectImpl(PassOwnPtr<protocol::Value> objectToInspect, PassOwnPtr<pro tocol::Value> hints);
70 70
71 void clearConsoleMessages(); 71 void clearConsoleMessages();
72 void debugFunction(const String& scriptId, int lineNumber, int columnNumber) ; 72 void debugFunction(const String16& scriptId, int lineNumber, int columnNumbe r);
73 void undebugFunction(const String& scriptId, int lineNumber, int columnNumbe r); 73 void undebugFunction(const String16& scriptId, int lineNumber, int columnNum ber);
74 void monitorFunction(const String& scriptId, int lineNumber, int columnNumbe r, const String& functionName); 74 void monitorFunction(const String16& scriptId, int lineNumber, int columnNum ber, const String16& functionName);
75 void unmonitorFunction(const String& scriptId, int lineNumber, int columnNum ber); 75 void unmonitorFunction(const String16& scriptId, int lineNumber, int columnN umber);
76 76
77 V8DebuggerImpl* debugger() { return m_debugger; } 77 V8DebuggerImpl* debugger() { return m_debugger; }
78 78
79 // FIXME: store this template in per isolate data 79 // FIXME: store this template in per isolate data
80 void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8: :Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); } 80 void setWrapperTemplate(v8::Local<v8::FunctionTemplate> wrapperTemplate, v8: :Isolate* isolate) { m_wrapperTemplate.Reset(isolate, wrapperTemplate); }
81 v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { retu rn v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); } 81 v8::Local<v8::FunctionTemplate> wrapperTemplate(v8::Isolate* isolate) { retu rn v8::Local<v8::FunctionTemplate>::New(isolate, m_wrapperTemplate); }
82 82
83 private: 83 private:
84 InjectedScriptHost(V8DebuggerImpl*); 84 InjectedScriptHost(V8DebuggerImpl*);
85 85
86 V8DebuggerImpl* m_debugger; 86 V8DebuggerImpl* m_debugger;
87 V8DebuggerAgentImpl* m_debuggerAgent; 87 V8DebuggerAgentImpl* m_debuggerAgent;
88 OwnPtr<V8RuntimeAgent::InspectCallback> m_inspectCallback; 88 OwnPtr<V8RuntimeAgent::InspectCallback> m_inspectCallback;
89 OwnPtr<V8RuntimeAgent::ClearConsoleCallback> m_clearConsoleCallback; 89 OwnPtr<V8RuntimeAgent::ClearConsoleCallback> m_clearConsoleCallback;
90 protocol::Vector<OwnPtr<V8RuntimeAgent::Inspectable>> m_inspectedObjects; 90 protocol::Vector<OwnPtr<V8RuntimeAgent::Inspectable>> m_inspectedObjects;
91 v8::Global<v8::FunctionTemplate> m_wrapperTemplate; 91 v8::Global<v8::FunctionTemplate> m_wrapperTemplate;
92 }; 92 };
93 93
94 } // namespace blink 94 } // namespace blink
95 95
96 #endif // InjectedScriptHost_h 96 #endif // InjectedScriptHost_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698