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

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

Issue 54002: Make DevTools client survive 'refresh' of the inspectable tab. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | Annotate | Revision Log
« no previous file with comments | « webkit/glue/devtools/tools_agent.h ('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 "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "webkit/glue/devtools/devtools_rpc.h" 11 #include "webkit/glue/devtools/devtools_rpc.h"
12 #include "webkit/glue/devtools/dom_agent.h" 12 #include "webkit/glue/devtools/dom_agent.h"
13 #include "webkit/glue/devtools/net_agent.h" 13 #include "webkit/glue/devtools/net_agent.h"
14 #include "webkit/glue/devtools/tools_agent.h" 14 #include "webkit/glue/devtools/tools_agent.h"
15 #include "webkit/glue/webdevtoolsagent.h" 15 #include "webkit/glue/webdevtoolsagent.h"
16 16
17 namespace WebCore { 17 namespace WebCore {
18 class Document; 18 class Document;
19 class Node; 19 class Node;
20 class String; 20 class String;
21 } 21 }
22 22
23 class DomAgentImpl; 23 class DomAgentImpl;
24 class NetAgentImpl; 24 class NetAgentImpl;
25 class Value; 25 class Value;
26 class WebDevToolsAgentDelegate; 26 class WebDevToolsAgentDelegate;
27 class WebFrame;
28 class WebFrame;
27 class WebViewImpl; 29 class WebViewImpl;
28 30
29 class WebDevToolsAgentImpl 31 class WebDevToolsAgentImpl
30 : public WebDevToolsAgent, 32 : public WebDevToolsAgent,
31 public ToolsAgent, 33 public ToolsAgent,
32 public DevToolsRpc::Delegate { 34 public DevToolsRpc::Delegate {
33 public: 35 public:
34 WebDevToolsAgentImpl(WebViewImpl* web_view_impl, 36 WebDevToolsAgentImpl(WebViewImpl* web_view_impl,
35 WebDevToolsAgentDelegate* delegate); 37 WebDevToolsAgentDelegate* delegate);
36 virtual ~WebDevToolsAgentImpl(); 38 virtual ~WebDevToolsAgentImpl();
37 39
38 // ToolsAgent implementation. 40 // ToolsAgent implementation.
39 virtual void SetDomAgentEnabled(bool enabled); 41 virtual void SetEnabled(bool enabled);
40 virtual void SetNetAgentEnabled(bool enabled);
41 virtual void HighlightDOMNode(int node_id); 42 virtual void HighlightDOMNode(int node_id);
42 virtual void HideDOMNodeHighlight(); 43 virtual void HideDOMNodeHighlight();
43 44
44 // WebDevToolsAgent implementation. 45 // WebDevToolsAgent implementation.
45 virtual void DispatchMessageFromClient(const std::string& raw_msg); 46 virtual void DispatchMessageFromClient(const std::string& raw_msg);
46 virtual void InspectElement(int x, int y); 47 virtual void InspectElement(int x, int y);
47 48
48 // DevToolsRpc::Delegate implementation. 49 // DevToolsRpc::Delegate implementation.
49 void SendRpcMessage(const std::string& raw_msg); 50 void SendRpcMessage(const std::string& raw_msg);
50 51
51 // Methods called by the glue. 52 // Methods called by the glue.
52 void SetMainFrameDocumentReady(bool ready); 53 void SetMainFrameDocumentReady(bool ready);
54 void DidCommitLoadForFrame(WebViewImpl* webview,
55 WebFrame* frame,
56 bool is_new_navigation);
53 57
54 DomAgentImpl* dom_agent_impl() { return dom_agent_impl_.get(); } 58 DomAgentImpl* dom_agent_impl() { return dom_agent_impl_.get(); }
55 NetAgentImpl* net_agent_impl() { return net_agent_impl_.get(); } 59 NetAgentImpl* net_agent_impl() { return net_agent_impl_.get(); }
56 WebViewImpl* web_view_impl() { return web_view_impl_; } 60 WebViewImpl* web_view_impl() { return web_view_impl_; }
57 61
58 private: 62 private:
59 WebDevToolsAgentDelegate* delegate_; 63 WebDevToolsAgentDelegate* delegate_;
60 WebViewImpl* web_view_impl_; 64 WebViewImpl* web_view_impl_;
61 WebCore::Document* document_; 65 WebCore::Document* document_;
62 scoped_ptr<DomAgentImpl> dom_agent_impl_; 66 scoped_ptr<DomAgentImpl> dom_agent_impl_;
63 scoped_ptr<NetAgentImpl> net_agent_impl_; 67 scoped_ptr<NetAgentImpl> net_agent_impl_;
64 scoped_ptr<DomAgentDelegateStub> dom_agent_delegate_stub_; 68 scoped_ptr<DomAgentDelegateStub> dom_agent_delegate_stub_;
65 scoped_ptr<NetAgentDelegateStub> net_agent_delegate_stub_; 69 scoped_ptr<NetAgentDelegateStub> net_agent_delegate_stub_;
66 scoped_ptr<ToolsAgentDelegateStub> tools_agent_delegate_stub_; 70 scoped_ptr<ToolsAgentDelegateStub> tools_agent_delegate_stub_;
71 bool enabled_;
67 DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgentImpl); 72 DISALLOW_COPY_AND_ASSIGN(WebDevToolsAgentImpl);
68 }; 73 };
69 74
70 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_ 75 #endif // WEBKIT_GLUE_WEBDEVTOOLSAGENT_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/devtools/tools_agent.h ('k') | webkit/glue/webdevtoolsagent_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698