| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
| 6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 #endif | 32 #endif |
| 33 | 33 |
| 34 class CONTENT_EXPORT RenderViewDevToolsAgentHost | 34 class CONTENT_EXPORT RenderViewDevToolsAgentHost |
| 35 : public IPCDevToolsAgentHost, | 35 : public IPCDevToolsAgentHost, |
| 36 private WebContentsObserver, | 36 private WebContentsObserver, |
| 37 public NotificationObserver { | 37 public NotificationObserver { |
| 38 public: | 38 public: |
| 39 static void OnCancelPendingNavigation(RenderViewHost* pending, | 39 static void OnCancelPendingNavigation(RenderViewHost* pending, |
| 40 RenderViewHost* current); | 40 RenderViewHost* current); |
| 41 | 41 |
| 42 static bool DispatchIPCMessage(RenderViewHost* source, | |
| 43 const IPC::Message& message); | |
| 44 | |
| 45 RenderViewDevToolsAgentHost(RenderViewHost*); | 42 RenderViewDevToolsAgentHost(RenderViewHost*); |
| 46 | 43 |
| 47 RenderViewHost* render_view_host() { return render_view_host_; } | 44 RenderViewHost* render_view_host() { return render_view_host_; } |
| 48 | 45 |
| 49 void SynchronousSwapCompositorFrame( | 46 void SynchronousSwapCompositorFrame( |
| 50 const cc::CompositorFrameMetadata& frame_metadata); | 47 const cc::CompositorFrameMetadata& frame_metadata); |
| 51 | 48 |
| 52 private: | 49 private: |
| 53 friend class DevToolsAgentHost; | 50 friend class DevToolsAgentHost; |
| 54 | 51 |
| 55 virtual ~RenderViewDevToolsAgentHost(); | 52 virtual ~RenderViewDevToolsAgentHost(); |
| 56 | 53 |
| 57 // DevTooolsAgentHost overrides. | 54 // DevTooolsAgentHost overrides. |
| 58 virtual void DisconnectRenderViewHost() OVERRIDE; | 55 virtual void DisconnectRenderViewHost() OVERRIDE; |
| 59 virtual void ConnectRenderViewHost(RenderViewHost* rvh) OVERRIDE; | 56 virtual void ConnectRenderViewHost(RenderViewHost* rvh) OVERRIDE; |
| 60 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; | 57 virtual RenderViewHost* GetRenderViewHost() OVERRIDE; |
| 61 | 58 |
| 62 // IPCDevToolsAgentHost overrides. | 59 // IPCDevToolsAgentHost overrides. |
| 63 virtual void DispatchOnInspectorBackend(const std::string& message) OVERRIDE; | 60 virtual void DispatchOnInspectorBackend(const std::string& message) OVERRIDE; |
| 64 virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; | 61 virtual void SendMessageToAgent(IPC::Message* msg) OVERRIDE; |
| 65 virtual void OnClientAttached() OVERRIDE; | 62 virtual void OnClientAttached() OVERRIDE; |
| 66 virtual void OnClientDetached() OVERRIDE; | 63 virtual void OnClientDetached() OVERRIDE; |
| 67 | 64 |
| 68 // WebContentsObserver overrides. | 65 // WebContentsObserver overrides. |
| 69 virtual void AboutToNavigateRenderView(RenderViewHost* dest_rvh) OVERRIDE; | 66 virtual void AboutToNavigateRenderView(RenderViewHost* dest_rvh) OVERRIDE; |
| 70 virtual void RenderViewHostChanged(RenderViewHost* old_host, | 67 virtual void RenderViewHostChanged(RenderViewHost* old_host, |
| 71 RenderViewHost* new_host) OVERRIDE; | 68 RenderViewHost* new_host) OVERRIDE; |
| 72 virtual void RenderViewDeleted(RenderViewHost* rvh) OVERRIDE; | 69 virtual void RenderViewDeleted(RenderViewHost* rvh) OVERRIDE; |
| 73 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; | 70 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE; |
| 71 virtual bool OnMessageReceived(const IPC::Message& message, |
| 72 RenderFrameHost* render_frame_host) OVERRIDE; |
| 73 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 74 virtual void DidAttachInterstitialPage() OVERRIDE; | 74 virtual void DidAttachInterstitialPage() OVERRIDE; |
| 75 | 75 |
| 76 // NotificationObserver overrides: | 76 // NotificationObserver overrides: |
| 77 virtual void Observe(int type, | 77 virtual void Observe(int type, |
| 78 const NotificationSource& source, | 78 const NotificationSource& source, |
| 79 const NotificationDetails& details) OVERRIDE; | 79 const NotificationDetails& details) OVERRIDE; |
| 80 | 80 |
| 81 void ReattachToRenderViewHost(RenderViewHost* rvh); | 81 void ReattachToRenderViewHost(RenderViewHost* rvh); |
| 82 | 82 |
| 83 bool DispatchIPCMessage(const IPC::Message& message); | 83 bool DispatchIPCMessage(const IPC::Message& message); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 107 std::string state_; | 107 std::string state_; |
| 108 NotificationRegistrar registrar_; | 108 NotificationRegistrar registrar_; |
| 109 bool reattaching_; | 109 bool reattaching_; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); | 111 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 } // namespace content | 114 } // namespace content |
| 115 | 115 |
| 116 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 116 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
| OLD | NEW |