OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_RENDERER_OVERRIDES_HANDLER_H_ | 5 #ifndef CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ |
6 #define CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ | 6 #define CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/ref_counted_memory.h" | 10 #include "base/memory/ref_counted_memory.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 : public DevToolsProtocol::Handler { | 39 : public DevToolsProtocol::Handler { |
40 public: | 40 public: |
41 RendererOverridesHandler(); | 41 RendererOverridesHandler(); |
42 virtual ~RendererOverridesHandler(); | 42 virtual ~RendererOverridesHandler(); |
43 | 43 |
44 void OnClientDetached(); | 44 void OnClientDetached(); |
45 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); | 45 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); |
46 void OnVisibilityChanged(bool visible); | 46 void OnVisibilityChanged(bool visible); |
47 void SetRenderViewHost(RenderViewHostImpl* host); | 47 void SetRenderViewHost(RenderViewHostImpl* host); |
48 void ClearRenderViewHost(); | 48 void ClearRenderViewHost(); |
| 49 void DidAttachInterstitialPage(); |
| 50 void DidDetachInterstitialPage(); |
49 | 51 |
50 private: | 52 private: |
51 void InnerSwapCompositorFrame(); | 53 void InnerSwapCompositorFrame(); |
52 | 54 |
53 // DOM domain. | 55 // DOM domain. |
54 scoped_refptr<DevToolsProtocol::Response> | 56 scoped_refptr<DevToolsProtocol::Response> |
55 GrantPermissionsForSetFileInputFiles( | 57 GrantPermissionsForSetFileInputFiles( |
56 scoped_refptr<DevToolsProtocol::Command> command); | 58 scoped_refptr<DevToolsProtocol::Command> command); |
57 | 59 |
58 // Network domain. | 60 // Network domain. |
59 scoped_refptr<DevToolsProtocol::Response> CanEmulateNetworkConditions( | 61 scoped_refptr<DevToolsProtocol::Response> CanEmulateNetworkConditions( |
60 scoped_refptr<DevToolsProtocol::Command> command); | 62 scoped_refptr<DevToolsProtocol::Command> command); |
61 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache( | 63 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache( |
62 scoped_refptr<DevToolsProtocol::Command> command); | 64 scoped_refptr<DevToolsProtocol::Command> command); |
63 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies( | 65 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies( |
64 scoped_refptr<DevToolsProtocol::Command> command); | 66 scoped_refptr<DevToolsProtocol::Command> command); |
65 | 67 |
66 // Page domain. | 68 // Page domain. |
| 69 scoped_refptr<DevToolsProtocol::Response> PageEnable( |
| 70 scoped_refptr<DevToolsProtocol::Command> command); |
67 scoped_refptr<DevToolsProtocol::Response> PageDisable( | 71 scoped_refptr<DevToolsProtocol::Response> PageDisable( |
68 scoped_refptr<DevToolsProtocol::Command> command); | 72 scoped_refptr<DevToolsProtocol::Command> command); |
69 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog( | 73 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog( |
70 scoped_refptr<DevToolsProtocol::Command> command); | 74 scoped_refptr<DevToolsProtocol::Command> command); |
71 scoped_refptr<DevToolsProtocol::Response> PageNavigate( | 75 scoped_refptr<DevToolsProtocol::Response> PageNavigate( |
72 scoped_refptr<DevToolsProtocol::Command> command); | 76 scoped_refptr<DevToolsProtocol::Command> command); |
73 scoped_refptr<DevToolsProtocol::Response> PageReload( | 77 scoped_refptr<DevToolsProtocol::Response> PageReload( |
74 scoped_refptr<DevToolsProtocol::Command> command); | 78 scoped_refptr<DevToolsProtocol::Command> command); |
75 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory( | 79 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory( |
76 scoped_refptr<DevToolsProtocol::Command> command); | 80 scoped_refptr<DevToolsProtocol::Command> command); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 bool HandleMouseEvent(const blink::WebMouseEvent& event); | 119 bool HandleMouseEvent(const blink::WebMouseEvent& event); |
116 void UpdateColorPickerCursor(); | 120 void UpdateColorPickerCursor(); |
117 | 121 |
118 // Input domain. | 122 // Input domain. |
119 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent( | 123 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent( |
120 scoped_refptr<DevToolsProtocol::Command> command); | 124 scoped_refptr<DevToolsProtocol::Command> command); |
121 | 125 |
122 void UpdateTouchEventEmulationState(); | 126 void UpdateTouchEventEmulationState(); |
123 | 127 |
124 RenderViewHostImpl* host_; | 128 RenderViewHostImpl* host_; |
| 129 bool page_domain_enabled_; |
125 scoped_refptr<DevToolsProtocol::Command> screencast_command_; | 130 scoped_refptr<DevToolsProtocol::Command> screencast_command_; |
126 bool has_last_compositor_frame_metadata_; | 131 bool has_last_compositor_frame_metadata_; |
127 cc::CompositorFrameMetadata last_compositor_frame_metadata_; | 132 cc::CompositorFrameMetadata last_compositor_frame_metadata_; |
128 base::TimeTicks last_frame_time_; | 133 base::TimeTicks last_frame_time_; |
129 int capture_retry_count_; | 134 int capture_retry_count_; |
130 bool touch_emulation_enabled_; | 135 bool touch_emulation_enabled_; |
131 bool color_picker_enabled_; | 136 bool color_picker_enabled_; |
132 SkBitmap color_picker_frame_; | 137 SkBitmap color_picker_frame_; |
133 int last_cursor_x_; | 138 int last_cursor_x_; |
134 int last_cursor_y_; | 139 int last_cursor_y_; |
135 RenderWidgetHost::MouseEventCallback mouse_event_callback_; | 140 RenderWidgetHost::MouseEventCallback mouse_event_callback_; |
136 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_; | 141 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_; |
137 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler); | 142 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler); |
138 }; | 143 }; |
139 | 144 |
140 } // namespace content | 145 } // namespace content |
141 | 146 |
142 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ | 147 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ |
OLD | NEW |