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 22 matching lines...) Expand all Loading... |
33 : public DevToolsProtocol::Handler { | 33 : public DevToolsProtocol::Handler { |
34 public: | 34 public: |
35 RendererOverridesHandler(); | 35 RendererOverridesHandler(); |
36 virtual ~RendererOverridesHandler(); | 36 virtual ~RendererOverridesHandler(); |
37 | 37 |
38 void OnClientDetached(); | 38 void OnClientDetached(); |
39 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); | 39 void OnSwapCompositorFrame(const cc::CompositorFrameMetadata& frame_metadata); |
40 void OnVisibilityChanged(bool visible); | 40 void OnVisibilityChanged(bool visible); |
41 void SetRenderViewHost(RenderViewHostImpl* host); | 41 void SetRenderViewHost(RenderViewHostImpl* host); |
42 void ClearRenderViewHost(); | 42 void ClearRenderViewHost(); |
43 bool OnSetTouchEventEmulationEnabled(); | |
44 | 43 |
45 private: | 44 private: |
46 void InnerSwapCompositorFrame(); | 45 void InnerSwapCompositorFrame(); |
47 | 46 |
48 // DOM domain. | 47 // DOM domain. |
49 scoped_refptr<DevToolsProtocol::Response> | 48 scoped_refptr<DevToolsProtocol::Response> |
50 GrantPermissionsForSetFileInputFiles( | 49 GrantPermissionsForSetFileInputFiles( |
51 scoped_refptr<DevToolsProtocol::Command> command); | 50 scoped_refptr<DevToolsProtocol::Command> command); |
52 | 51 |
53 // Network domain. | 52 // Network domain. |
54 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache( | 53 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache( |
55 scoped_refptr<DevToolsProtocol::Command> command); | 54 scoped_refptr<DevToolsProtocol::Command> command); |
56 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies( | 55 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies( |
57 scoped_refptr<DevToolsProtocol::Command> command); | 56 scoped_refptr<DevToolsProtocol::Command> command); |
58 | 57 |
59 // Page domain. | 58 // Page domain. |
60 scoped_refptr<DevToolsProtocol::Response> PageDisable( | 59 scoped_refptr<DevToolsProtocol::Response> PageDisable( |
61 scoped_refptr<DevToolsProtocol::Command> command); | 60 scoped_refptr<DevToolsProtocol::Command> command); |
62 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog( | 61 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog( |
63 scoped_refptr<DevToolsProtocol::Command> command); | 62 scoped_refptr<DevToolsProtocol::Command> command); |
64 scoped_refptr<DevToolsProtocol::Response> PageNavigate( | 63 scoped_refptr<DevToolsProtocol::Response> PageNavigate( |
65 scoped_refptr<DevToolsProtocol::Command> command); | 64 scoped_refptr<DevToolsProtocol::Command> command); |
66 scoped_refptr<DevToolsProtocol::Response> PageReload( | 65 scoped_refptr<DevToolsProtocol::Response> PageReload( |
67 scoped_refptr<DevToolsProtocol::Command> command); | 66 scoped_refptr<DevToolsProtocol::Command> command); |
68 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory( | 67 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory( |
69 scoped_refptr<DevToolsProtocol::Command> command); | 68 scoped_refptr<DevToolsProtocol::Command> command); |
70 scoped_refptr<DevToolsProtocol::Response> PageNavigateToHistoryEntry( | 69 scoped_refptr<DevToolsProtocol::Response> PageNavigateToHistoryEntry( |
71 scoped_refptr<DevToolsProtocol::Command> command); | 70 scoped_refptr<DevToolsProtocol::Command> command); |
| 71 scoped_refptr<DevToolsProtocol::Response> PageSetTouchEmulationEnabled( |
| 72 scoped_refptr<DevToolsProtocol::Command> command); |
72 scoped_refptr<DevToolsProtocol::Response> PageCaptureScreenshot( | 73 scoped_refptr<DevToolsProtocol::Response> PageCaptureScreenshot( |
73 scoped_refptr<DevToolsProtocol::Command> command); | 74 scoped_refptr<DevToolsProtocol::Command> command); |
74 scoped_refptr<DevToolsProtocol::Response> PageCanScreencast( | 75 scoped_refptr<DevToolsProtocol::Response> PageCanScreencast( |
75 scoped_refptr<DevToolsProtocol::Command> command); | 76 scoped_refptr<DevToolsProtocol::Command> command); |
76 scoped_refptr<DevToolsProtocol::Response> PageStartScreencast( | 77 scoped_refptr<DevToolsProtocol::Response> PageStartScreencast( |
77 scoped_refptr<DevToolsProtocol::Command> command); | 78 scoped_refptr<DevToolsProtocol::Command> command); |
78 scoped_refptr<DevToolsProtocol::Response> PageStopScreencast( | 79 scoped_refptr<DevToolsProtocol::Response> PageStopScreencast( |
79 scoped_refptr<DevToolsProtocol::Command> command); | 80 scoped_refptr<DevToolsProtocol::Command> command); |
80 scoped_refptr<DevToolsProtocol::Response> PageQueryUsageAndQuota( | 81 scoped_refptr<DevToolsProtocol::Response> PageQueryUsageAndQuota( |
81 scoped_refptr<DevToolsProtocol::Command>); | 82 scoped_refptr<DevToolsProtocol::Command>); |
(...skipping 13 matching lines...) Expand all Loading... |
95 void PageQueryUsageAndQuotaCompleted( | 96 void PageQueryUsageAndQuotaCompleted( |
96 scoped_refptr<DevToolsProtocol::Command>, | 97 scoped_refptr<DevToolsProtocol::Command>, |
97 scoped_ptr<base::DictionaryValue> response_data); | 98 scoped_ptr<base::DictionaryValue> response_data); |
98 | 99 |
99 void NotifyScreencastVisibility(bool visible); | 100 void NotifyScreencastVisibility(bool visible); |
100 | 101 |
101 // Input domain. | 102 // Input domain. |
102 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent( | 103 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent( |
103 scoped_refptr<DevToolsProtocol::Command> command); | 104 scoped_refptr<DevToolsProtocol::Command> command); |
104 | 105 |
| 106 void SetTouchEventEmulationEnabled(bool enabled); |
| 107 |
105 RenderViewHostImpl* host_; | 108 RenderViewHostImpl* host_; |
106 scoped_refptr<DevToolsProtocol::Command> screencast_command_; | 109 scoped_refptr<DevToolsProtocol::Command> screencast_command_; |
107 bool has_last_compositor_frame_metadata_; | 110 bool has_last_compositor_frame_metadata_; |
108 cc::CompositorFrameMetadata last_compositor_frame_metadata_; | 111 cc::CompositorFrameMetadata last_compositor_frame_metadata_; |
109 base::TimeTicks last_frame_time_; | 112 base::TimeTicks last_frame_time_; |
110 int capture_retry_count_; | 113 int capture_retry_count_; |
| 114 bool touch_emulation_enabled_; |
111 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_; | 115 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_; |
112 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler); | 116 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler); |
113 }; | 117 }; |
114 | 118 |
115 } // namespace content | 119 } // namespace content |
116 | 120 |
117 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ | 121 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ |
OLD | NEW |