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

Side by Side Diff: webkit/glue/webdevtoolsagent_impl.h

Issue 343075: DevTools: support cross-navigation instrumentation. (Closed)
Patch Set: '' Created 11 years, 1 month 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 | « webkit/glue/devtools/js/inject_dispatch.js ('k') | webkit/glue/webdevtoolsagent_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ 5 #ifndef WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_
6 #define WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ 6 #define WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include <wtf/OwnPtr.h> 10 #include <wtf/OwnPtr.h>
11 11
12 #include "v8.h" 12 #include "v8.h"
13 #include "webkit/api/public/WebDevToolsAgent.h" 13 #include "webkit/api/public/WebDevToolsAgent.h"
14 #include "webkit/glue/devtools/devtools_rpc.h" 14 #include "webkit/glue/devtools/devtools_rpc.h"
15 #include "webkit/glue/devtools/apu_agent_delegate.h" 15 #include "webkit/glue/devtools/apu_agent_delegate.h"
16 #include "webkit/glue/devtools/tools_agent.h" 16 #include "webkit/glue/devtools/tools_agent.h"
17 17
18 namespace WebCore { 18 namespace WebCore {
19 class Document; 19 class Document;
20 class Node; 20 class Node;
21 class ScriptState; 21 class ScriptState;
22 class String; 22 class String;
23 } 23 }
24 24
25 namespace WebKit { 25 namespace WebKit {
26 class WebDevToolsAgentClient; 26 class WebDevToolsAgentClient;
27 class WebFrame; 27 class WebFrame;
28 class WebFrameImpl; 28 class WebFrameImpl;
29 class WebString;
29 class WebViewImpl; 30 class WebViewImpl;
30 } 31 }
31 32
32 class BoundObject; 33 class BoundObject;
33 class DebuggerAgentDelegateStub; 34 class DebuggerAgentDelegateStub;
34 class DebuggerAgentImpl; 35 class DebuggerAgentImpl;
35 class Value; 36 class Value;
36 37
37 class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgent, 38 class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgent,
38 public ToolsAgent, 39 public ToolsAgent,
(...skipping 21 matching lines...) Expand all
60 virtual void attach(); 61 virtual void attach();
61 virtual void detach(); 62 virtual void detach();
62 virtual void didNavigate(); 63 virtual void didNavigate();
63 virtual void dispatchMessageFromFrontend( 64 virtual void dispatchMessageFromFrontend(
64 const WebKit::WebString& class_name, 65 const WebKit::WebString& class_name,
65 const WebKit::WebString& method_name, 66 const WebKit::WebString& method_name,
66 const WebKit::WebString& param1, 67 const WebKit::WebString& param1,
67 const WebKit::WebString& param2, 68 const WebKit::WebString& param2,
68 const WebKit::WebString& param3); 69 const WebKit::WebString& param3);
69 virtual void inspectElementAt(const WebKit::WebPoint& point); 70 virtual void inspectElementAt(const WebKit::WebPoint& point);
70 virtual void setApuAgentEnabled(bool enable); 71 virtual void setRuntimeFeatureEnabled(const WebKit::WebString& feature,
72 bool enabled);
71 73
72 // DevToolsRpc::Delegate implementation. 74 // DevToolsRpc::Delegate implementation.
73 void SendRpcMessage(const WebCore::String& class_name, 75 void SendRpcMessage(const WebCore::String& class_name,
74 const WebCore::String& method_name, 76 const WebCore::String& method_name,
75 const WebCore::String& param1, 77 const WebCore::String& param1,
76 const WebCore::String& param2, 78 const WebCore::String& param2,
77 const WebCore::String& param3); 79 const WebCore::String& param3);
78 80
79 // Methods called by the glue. 81 // Methods called by the glue.
80 void SetMainFrameDocumentReady(bool ready); 82 void SetMainFrameDocumentReady(bool ready);
81 void DidCommitLoadForFrame(WebKit::WebViewImpl* webview, 83 void DidCommitLoadForFrame(WebKit::WebViewImpl* webview,
82 WebKit::WebFrame* frame, 84 WebKit::WebFrame* frame,
83 bool is_new_navigation); 85 bool is_new_navigation);
84 86
85 void WindowObjectCleared(WebKit::WebFrameImpl* webframe); 87 void WindowObjectCleared(WebKit::WebFrameImpl* webframe);
86 88
87 void ForceRepaint(); 89 void ForceRepaint();
88 90
89 int host_id() { return host_id_; } 91 int host_id() { return host_id_; }
90 92
91 private: 93 private:
92 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args); 94 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args);
93 static v8::Handle<v8::Value> JsDispatchToApu(const v8::Arguments& args); 95 static v8::Handle<v8::Value> JsDispatchToApu(const v8::Arguments& args);
96 static v8::Handle<v8::Value> JsOnRuntimeFeatureStateChanged(
97 const v8::Arguments& args);
98
94 void DisposeUtilityContext(); 99 void DisposeUtilityContext();
95 void UnhideResourcesPanelIfNecessary(); 100 void UnhideResourcesPanelIfNecessary();
96 101
97 void InitDevToolsAgentHost(); 102 void InitDevToolsAgentHost();
98 void ResetInspectorFrontendProxy(); 103 void ResetInspectorFrontendProxy();
104 void setApuAgentEnabled(bool enabled);
99 105
100 // Creates InspectorBackend v8 wrapper in the utility context so that it's 106 // Creates InspectorBackend v8 wrapper in the utility context so that it's
101 // methods prototype is Function.protoype object from the utility context. 107 // methods prototype is Function.protoype object from the utility context.
102 // Otherwise some useful methods defined on Function.prototype(such as bind) 108 // Otherwise some useful methods defined on Function.prototype(such as bind)
103 // are missing for InspectorController native methods. 109 // are missing for InspectorController native methods.
104 v8::Local<v8::Object> CreateInspectorBackendV8Wrapper(); 110 v8::Local<v8::Object> CreateInspectorBackendV8Wrapper();
105 111
106 int host_id_; 112 int host_id_;
107 WebKit::WebDevToolsAgentClient* client_; 113 WebKit::WebDevToolsAgentClient* client_;
108 WebKit::WebViewImpl* web_view_impl_; 114 WebKit::WebViewImpl* web_view_impl_;
109 OwnPtr<DebuggerAgentDelegateStub> debugger_agent_delegate_stub_; 115 OwnPtr<DebuggerAgentDelegateStub> debugger_agent_delegate_stub_;
110 OwnPtr<ToolsAgentDelegateStub> tools_agent_delegate_stub_; 116 OwnPtr<ToolsAgentDelegateStub> tools_agent_delegate_stub_;
111 OwnPtr<ToolsAgentNativeDelegateStub> tools_agent_native_delegate_stub_; 117 OwnPtr<ToolsAgentNativeDelegateStub> tools_agent_native_delegate_stub_;
112 OwnPtr<DebuggerAgentImpl> debugger_agent_impl_; 118 OwnPtr<DebuggerAgentImpl> debugger_agent_impl_;
113 OwnPtr<ApuAgentDelegateStub> apu_agent_delegate_stub_; 119 OwnPtr<ApuAgentDelegateStub> apu_agent_delegate_stub_;
114 bool apu_agent_enabled_; 120 bool apu_agent_enabled_;
115 bool resource_tracking_was_enabled_; 121 bool resource_tracking_was_enabled_;
116 bool attached_; 122 bool attached_;
117 // TODO(pfeldman): This should not be needed once GC styles issue is fixed 123 // TODO(pfeldman): This should not be needed once GC styles issue is fixed
118 // for matching rules. 124 // for matching rules.
119 v8::Persistent<v8::Context> utility_context_; 125 v8::Persistent<v8::Context> utility_context_;
120 OwnPtr<BoundObject> devtools_agent_host_; 126 OwnPtr<BoundObject> devtools_agent_host_;
121 OwnPtr<WebCore::ScriptState> inspector_frontend_script_state_; 127 OwnPtr<WebCore::ScriptState> inspector_frontend_script_state_;
122 }; 128 };
123 129
124 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ 130 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/devtools/js/inject_dispatch.js ('k') | webkit/glue/webdevtoolsagent_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698