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

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

Issue 342092: Eliminate WebViewImpl's dependency on WebDevToolsAgentImpl.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
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 | Annotate | Revision Log
« no previous file with comments | « webkit/api/src/WebViewImpl.cpp ('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/src/WebDevToolsAgentPrivate.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 WebString;
30 class WebViewImpl; 30 class WebViewImpl;
31 } 31 }
32 32
33 class BoundObject; 33 class BoundObject;
34 class DebuggerAgentDelegateStub; 34 class DebuggerAgentDelegateStub;
35 class DebuggerAgentImpl; 35 class DebuggerAgentImpl;
36 class Value; 36 class Value;
37 37
38 class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgent, 38 class WebDevToolsAgentImpl : public WebKit::WebDevToolsAgentPrivate,
39 public ToolsAgent, 39 public ToolsAgent,
40 public DevToolsRpc::Delegate { 40 public DevToolsRpc::Delegate {
41 public: 41 public:
42 WebDevToolsAgentImpl(WebKit::WebViewImpl* web_view_impl, 42 WebDevToolsAgentImpl(WebKit::WebViewImpl* web_view_impl,
43 WebKit::WebDevToolsAgentClient* client); 43 WebKit::WebDevToolsAgentClient* client);
44 virtual ~WebDevToolsAgentImpl(); 44 virtual ~WebDevToolsAgentImpl();
45 45
46 // ToolsAgent implementation. 46 // ToolsAgent implementation.
47 virtual void DispatchOnInspectorController( 47 virtual void DispatchOnInspectorController(
48 int call_id, 48 int call_id,
49 const WebCore::String& function_name, 49 const WebCore::String& function_name,
50 const WebCore::String& json_args); 50 const WebCore::String& json_args);
51 virtual void DispatchOnInjectedScript( 51 virtual void DispatchOnInjectedScript(
52 int call_id, 52 int call_id,
53 const WebCore::String& function_name, 53 const WebCore::String& function_name,
54 const WebCore::String& json_args); 54 const WebCore::String& json_args);
55 virtual void ExecuteVoidJavaScript(); 55 virtual void ExecuteVoidJavaScript();
56 virtual void GetResourceContent( 56 virtual void GetResourceContent(
57 int call_id, 57 int call_id,
58 int identifier); 58 int identifier);
59 59
60 // WebDevToolsAgentPrivate implementation.
61 virtual void didClearWindowObject(WebKit::WebFrameImpl* frame);
62 virtual void didCommitProvisionalLoad(
63 WebKit::WebFrameImpl* frame, bool is_new_navigation);
64
60 // WebDevToolsAgent implementation. 65 // WebDevToolsAgent implementation.
61 virtual void attach(); 66 virtual void attach();
62 virtual void detach(); 67 virtual void detach();
63 virtual void didNavigate(); 68 virtual void didNavigate();
64 virtual void dispatchMessageFromFrontend( 69 virtual void dispatchMessageFromFrontend(
65 const WebKit::WebString& class_name, 70 const WebKit::WebString& class_name,
66 const WebKit::WebString& method_name, 71 const WebKit::WebString& method_name,
67 const WebKit::WebString& param1, 72 const WebKit::WebString& param1,
68 const WebKit::WebString& param2, 73 const WebKit::WebString& param2,
69 const WebKit::WebString& param3); 74 const WebKit::WebString& param3);
70 virtual void inspectElementAt(const WebKit::WebPoint& point); 75 virtual void inspectElementAt(const WebKit::WebPoint& point);
71 virtual void setRuntimeFeatureEnabled(const WebKit::WebString& feature, 76 virtual void setRuntimeFeatureEnabled(const WebKit::WebString& feature,
72 bool enabled); 77 bool enabled);
73 78
74 // DevToolsRpc::Delegate implementation. 79 // DevToolsRpc::Delegate implementation.
75 void SendRpcMessage(const WebCore::String& class_name, 80 void SendRpcMessage(const WebCore::String& class_name,
76 const WebCore::String& method_name, 81 const WebCore::String& method_name,
77 const WebCore::String& param1, 82 const WebCore::String& param1,
78 const WebCore::String& param2, 83 const WebCore::String& param2,
79 const WebCore::String& param3); 84 const WebCore::String& param3);
80 85
81 // Methods called by the glue.
82 void SetMainFrameDocumentReady(bool ready);
83 void DidCommitLoadForFrame(WebKit::WebViewImpl* webview,
84 WebKit::WebFrame* frame,
85 bool is_new_navigation);
86
87 void WindowObjectCleared(WebKit::WebFrameImpl* webframe);
88
89 void ForceRepaint(); 86 void ForceRepaint();
90 87
91 int host_id() { return host_id_; } 88 int host_id() { return host_id_; }
92 89
93 private: 90 private:
94 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args); 91 static v8::Handle<v8::Value> JsDispatchOnClient(const v8::Arguments& args);
95 static v8::Handle<v8::Value> JsDispatchToApu(const v8::Arguments& args); 92 static v8::Handle<v8::Value> JsDispatchToApu(const v8::Arguments& args);
96 static v8::Handle<v8::Value> JsOnRuntimeFeatureStateChanged( 93 static v8::Handle<v8::Value> JsOnRuntimeFeatureStateChanged(
97 const v8::Arguments& args); 94 const v8::Arguments& args);
98 95
(...skipping 22 matching lines...) Expand all
121 bool resource_tracking_was_enabled_; 118 bool resource_tracking_was_enabled_;
122 bool attached_; 119 bool attached_;
123 // TODO(pfeldman): This should not be needed once GC styles issue is fixed 120 // TODO(pfeldman): This should not be needed once GC styles issue is fixed
124 // for matching rules. 121 // for matching rules.
125 v8::Persistent<v8::Context> utility_context_; 122 v8::Persistent<v8::Context> utility_context_;
126 OwnPtr<BoundObject> devtools_agent_host_; 123 OwnPtr<BoundObject> devtools_agent_host_;
127 OwnPtr<WebCore::ScriptState> inspector_frontend_script_state_; 124 OwnPtr<WebCore::ScriptState> inspector_frontend_script_state_;
128 }; 125 };
129 126
130 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ 127 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/api/src/WebViewImpl.cpp ('k') | webkit/glue/webdevtoolsagent_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698