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" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "content/browser/devtools/ipc_devtools_agent_host.h" | 13 #include "content/browser/devtools/ipc_devtools_agent_host.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
17 #include "content/public/browser/web_contents_observer.h" | 17 #include "content/public/browser/web_contents_observer.h" |
18 | 18 |
19 namespace cc { | 19 namespace cc { |
20 class CompositorFrameMetadata; | 20 class CompositorFrameMetadata; |
21 } | 21 } |
22 | 22 |
23 namespace content { | 23 namespace content { |
24 | 24 |
25 class DevToolsPowerHandler; | 25 class DevToolsPowerHandler; |
26 class DevToolsProtocolHandlerImpl; | |
26 class DevToolsTracingHandler; | 27 class DevToolsTracingHandler; |
27 class RendererOverridesHandler; | 28 class RendererOverridesHandler; |
28 class RenderViewHost; | 29 class RenderViewHost; |
29 class RenderViewHostImpl; | 30 class RenderViewHostImpl; |
30 | 31 |
31 #if defined(OS_ANDROID) | 32 #if defined(OS_ANDROID) |
32 class PowerSaveBlockerImpl; | 33 class PowerSaveBlockerImpl; |
33 #endif | 34 #endif |
34 | 35 |
36 namespace devtools { | |
37 | |
38 namespace input { | |
39 class InputHandler; | |
dgozman
2014/09/22 12:46:06
Let's include them all.
vkuzkokov
2014/09/22 12:57:28
Done.
| |
40 } // namespace input | |
41 | |
42 namespace page { | |
43 class PageHandler; | |
44 } // namespace page | |
45 | |
46 } // namespace devtools | |
47 | |
35 class CONTENT_EXPORT RenderViewDevToolsAgentHost | 48 class CONTENT_EXPORT RenderViewDevToolsAgentHost |
36 : public IPCDevToolsAgentHost, | 49 : public IPCDevToolsAgentHost, |
37 private WebContentsObserver, | 50 private WebContentsObserver, |
38 public NotificationObserver { | 51 public NotificationObserver { |
39 public: | 52 public: |
40 static void OnCancelPendingNavigation(RenderViewHost* pending, | 53 static void OnCancelPendingNavigation(RenderViewHost* pending, |
41 RenderViewHost* current); | 54 RenderViewHost* current); |
42 | 55 |
43 RenderViewDevToolsAgentHost(RenderViewHost*); | 56 RenderViewDevToolsAgentHost(RenderViewHost*); |
44 | 57 |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
97 | 110 |
98 void OnDispatchOnInspectorFrontend(const std::string& message); | 111 void OnDispatchOnInspectorFrontend(const std::string& message); |
99 void OnSaveAgentRuntimeState(const std::string& state); | 112 void OnSaveAgentRuntimeState(const std::string& state); |
100 | 113 |
101 void ClientDetachedFromRenderer(); | 114 void ClientDetachedFromRenderer(); |
102 | 115 |
103 void InnerOnClientAttached(); | 116 void InnerOnClientAttached(); |
104 void InnerClientDetachedFromRenderer(); | 117 void InnerClientDetachedFromRenderer(); |
105 | 118 |
106 RenderViewHostImpl* render_view_host_; | 119 RenderViewHostImpl* render_view_host_; |
120 scoped_ptr<DevToolsProtocolHandlerImpl> handler_impl_; | |
dgozman
2014/09/22 12:46:06
Let's put this after all handlers for safe destruc
vkuzkokov
2014/09/22 12:57:28
Done.
| |
121 scoped_ptr<devtools::input::InputHandler> input_handler_; | |
122 scoped_ptr<devtools::page::PageHandler> page_handler_; | |
107 scoped_ptr<RendererOverridesHandler> overrides_handler_; | 123 scoped_ptr<RendererOverridesHandler> overrides_handler_; |
108 scoped_ptr<DevToolsTracingHandler> tracing_handler_; | 124 scoped_ptr<DevToolsTracingHandler> tracing_handler_; |
109 scoped_ptr<DevToolsPowerHandler> power_handler_; | 125 scoped_ptr<DevToolsPowerHandler> power_handler_; |
110 #if defined(OS_ANDROID) | 126 #if defined(OS_ANDROID) |
111 scoped_ptr<PowerSaveBlockerImpl> power_save_blocker_; | 127 scoped_ptr<PowerSaveBlockerImpl> power_save_blocker_; |
112 #endif | 128 #endif |
113 std::string state_; | 129 std::string state_; |
114 NotificationRegistrar registrar_; | 130 NotificationRegistrar registrar_; |
115 bool reattaching_; | 131 bool reattaching_; |
116 | 132 |
117 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); | 133 DISALLOW_COPY_AND_ASSIGN(RenderViewDevToolsAgentHost); |
118 }; | 134 }; |
119 | 135 |
120 } // namespace content | 136 } // namespace content |
121 | 137 |
122 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ | 138 #endif // CONTENT_BROWSER_DEVTOOLS_RENDER_VIEW_DEVTOOLS_AGENT_HOST_H_ |
OLD | NEW |