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

Unified Diff: chrome/renderer/devtools_agent.h

Issue 6151011: Introduce RenderView::Observer interface so that RenderView doesn't have to k... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/device_orientation_dispatcher.cc ('k') | chrome/renderer/devtools_agent.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/devtools_agent.h
===================================================================
--- chrome/renderer/devtools_agent.h (revision 71253)
+++ chrome/renderer/devtools_agent.h (working copy)
@@ -11,29 +11,34 @@
#include "base/basictypes.h"
#include "chrome/common/devtools_messages.h"
-#include "ipc/ipc_channel.h"
+#include "chrome/renderer/render_view_observer.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h"
namespace WebKit {
class WebDevToolsAgent;
}
-class RenderView;
struct DevToolsMessageData;
// DevToolsAgent belongs to the inspectable RenderView and provides Glue's
// agents with the communication capabilities. All messages from/to Glue's
-// agents infrastructure are flowing through this comminucation agent.
+// agents infrastructure are flowing through this communication agent.
// There is a corresponding DevToolsClient object on the client side.
-class DevToolsAgent : public WebKit::WebDevToolsAgentClient,
- public IPC::Channel::Listener {
+class DevToolsAgent : public RenderViewObserver,
+ public WebKit::WebDevToolsAgentClient {
public:
- DevToolsAgent(int routing_id, RenderView* view);
+ explicit DevToolsAgent(RenderView* render_view);
virtual ~DevToolsAgent();
- void OnNavigate();
+ // Returns agent instance for its host id.
+ static DevToolsAgent* FromHostId(int host_id);
- // IPC::Channel::Listener implementation.
+ WebKit::WebDevToolsAgent* GetWebAgent();
+
+ private:
+ friend class DevToolsAgentFilter;
+
+ // RenderView::Observer implementation.
virtual bool OnMessageReceived(const IPC::Message& message);
// WebDevToolsAgentClient implementation
@@ -50,26 +55,16 @@
createClientMessageLoop();
virtual bool exposeV8DebuggerProtocol();
- // Returns agent instance for its host id.
- static DevToolsAgent* FromHostId(int host_id);
-
- RenderView* render_view() { return render_view_; }
-
- WebKit::WebDevToolsAgent* GetWebAgent();
-
- private:
- friend class DevToolsAgentFilter;
-
void OnAttach(const DevToolsRuntimeProperties& runtime_properties);
void OnDetach();
void OnFrontendLoaded();
void OnDispatchOnInspectorBackend(const std::string& message);
void OnInspectElement(int x, int y);
+ void OnSetApuAgentEnabled(bool enabled);
+ void OnNavigate();
static std::map<int, DevToolsAgent*> agent_for_routing_id_;
- int routing_id_; // View routing id that we can access from IO thread.
- RenderView* render_view_;
bool expose_v8_debugger_protocol_;
DISALLOW_COPY_AND_ASSIGN(DevToolsAgent);
« no previous file with comments | « chrome/renderer/device_orientation_dispatcher.cc ('k') | chrome/renderer/devtools_agent.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698