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

Side by Side Diff: content/browser/devtools/renderer_overrides_handler.h

Issue 474213002: DevTools: control touch emulation from the browser side only. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment addressed. Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 bool OnSetTouchEventEmulationEnabled();
50 49
51 private: 50 private:
52 void InnerSwapCompositorFrame(); 51 void InnerSwapCompositorFrame();
53 52
54 // DOM domain. 53 // DOM domain.
55 scoped_refptr<DevToolsProtocol::Response> 54 scoped_refptr<DevToolsProtocol::Response>
56 GrantPermissionsForSetFileInputFiles( 55 GrantPermissionsForSetFileInputFiles(
57 scoped_refptr<DevToolsProtocol::Command> command); 56 scoped_refptr<DevToolsProtocol::Command> command);
58 57
59 // Network domain. 58 // Network domain.
60 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache( 59 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCache(
61 scoped_refptr<DevToolsProtocol::Command> command); 60 scoped_refptr<DevToolsProtocol::Command> command);
62 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies( 61 scoped_refptr<DevToolsProtocol::Response> ClearBrowserCookies(
63 scoped_refptr<DevToolsProtocol::Command> command); 62 scoped_refptr<DevToolsProtocol::Command> command);
64 63
65 // Page domain. 64 // Page domain.
66 scoped_refptr<DevToolsProtocol::Response> PageDisable( 65 scoped_refptr<DevToolsProtocol::Response> PageDisable(
67 scoped_refptr<DevToolsProtocol::Command> command); 66 scoped_refptr<DevToolsProtocol::Command> command);
68 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog( 67 scoped_refptr<DevToolsProtocol::Response> PageHandleJavaScriptDialog(
69 scoped_refptr<DevToolsProtocol::Command> command); 68 scoped_refptr<DevToolsProtocol::Command> command);
70 scoped_refptr<DevToolsProtocol::Response> PageNavigate( 69 scoped_refptr<DevToolsProtocol::Response> PageNavigate(
71 scoped_refptr<DevToolsProtocol::Command> command); 70 scoped_refptr<DevToolsProtocol::Command> command);
72 scoped_refptr<DevToolsProtocol::Response> PageReload( 71 scoped_refptr<DevToolsProtocol::Response> PageReload(
73 scoped_refptr<DevToolsProtocol::Command> command); 72 scoped_refptr<DevToolsProtocol::Command> command);
74 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory( 73 scoped_refptr<DevToolsProtocol::Response> PageGetNavigationHistory(
75 scoped_refptr<DevToolsProtocol::Command> command); 74 scoped_refptr<DevToolsProtocol::Command> command);
76 scoped_refptr<DevToolsProtocol::Response> PageNavigateToHistoryEntry( 75 scoped_refptr<DevToolsProtocol::Response> PageNavigateToHistoryEntry(
77 scoped_refptr<DevToolsProtocol::Command> command); 76 scoped_refptr<DevToolsProtocol::Command> command);
77 scoped_refptr<DevToolsProtocol::Response> PageSetTouchEmulationEnabled(
78 scoped_refptr<DevToolsProtocol::Command> command);
78 scoped_refptr<DevToolsProtocol::Response> PageCaptureScreenshot( 79 scoped_refptr<DevToolsProtocol::Response> PageCaptureScreenshot(
79 scoped_refptr<DevToolsProtocol::Command> command); 80 scoped_refptr<DevToolsProtocol::Command> command);
80 scoped_refptr<DevToolsProtocol::Response> PageCanScreencast( 81 scoped_refptr<DevToolsProtocol::Response> PageCanScreencast(
81 scoped_refptr<DevToolsProtocol::Command> command); 82 scoped_refptr<DevToolsProtocol::Command> command);
82 scoped_refptr<DevToolsProtocol::Response> PageStartScreencast( 83 scoped_refptr<DevToolsProtocol::Response> PageStartScreencast(
83 scoped_refptr<DevToolsProtocol::Command> command); 84 scoped_refptr<DevToolsProtocol::Command> command);
84 scoped_refptr<DevToolsProtocol::Response> PageStopScreencast( 85 scoped_refptr<DevToolsProtocol::Response> PageStopScreencast(
85 scoped_refptr<DevToolsProtocol::Command> command); 86 scoped_refptr<DevToolsProtocol::Command> command);
86 scoped_refptr<DevToolsProtocol::Response> PageQueryUsageAndQuota( 87 scoped_refptr<DevToolsProtocol::Response> PageQueryUsageAndQuota(
87 scoped_refptr<DevToolsProtocol::Command>); 88 scoped_refptr<DevToolsProtocol::Command>);
(...skipping 21 matching lines...) Expand all
109 void UpdateColorPickerFrame(); 110 void UpdateColorPickerFrame();
110 void ResetColorPickerFrame(); 111 void ResetColorPickerFrame();
111 void ColorPickerFrameUpdated(bool succeeded, const SkBitmap& bitmap); 112 void ColorPickerFrameUpdated(bool succeeded, const SkBitmap& bitmap);
112 bool HandleMouseEvent(const blink::WebMouseEvent& event); 113 bool HandleMouseEvent(const blink::WebMouseEvent& event);
113 void UpdateColorPickerCursor(); 114 void UpdateColorPickerCursor();
114 115
115 // Input domain. 116 // Input domain.
116 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent( 117 scoped_refptr<DevToolsProtocol::Response> InputEmulateTouchFromMouseEvent(
117 scoped_refptr<DevToolsProtocol::Command> command); 118 scoped_refptr<DevToolsProtocol::Command> command);
118 119
120 void UpdateTouchEventEmulationState();
121
119 RenderViewHostImpl* host_; 122 RenderViewHostImpl* host_;
120 scoped_refptr<DevToolsProtocol::Command> screencast_command_; 123 scoped_refptr<DevToolsProtocol::Command> screencast_command_;
121 bool has_last_compositor_frame_metadata_; 124 bool has_last_compositor_frame_metadata_;
122 cc::CompositorFrameMetadata last_compositor_frame_metadata_; 125 cc::CompositorFrameMetadata last_compositor_frame_metadata_;
123 base::TimeTicks last_frame_time_; 126 base::TimeTicks last_frame_time_;
124 int capture_retry_count_; 127 int capture_retry_count_;
128 bool touch_emulation_enabled_;
125 bool color_picker_enabled_; 129 bool color_picker_enabled_;
126 SkBitmap color_picker_frame_; 130 SkBitmap color_picker_frame_;
127 int last_cursor_x_; 131 int last_cursor_x_;
128 int last_cursor_y_; 132 int last_cursor_y_;
129 RenderWidgetHost::MouseEventCallback mouse_event_callback_; 133 RenderWidgetHost::MouseEventCallback mouse_event_callback_;
130 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_; 134 base::WeakPtrFactory<RendererOverridesHandler> weak_factory_;
131 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler); 135 DISALLOW_COPY_AND_ASSIGN(RendererOverridesHandler);
132 }; 136 };
133 137
134 } // namespace content 138 } // namespace content
135 139
136 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_ 140 #endif // CONTENT_BROWSER_DEVTOOLS_RENDERER_OVERRIDES_HANDLER_H_
OLDNEW
« no previous file with comments | « content/browser/devtools/render_view_devtools_agent_host.cc ('k') | content/browser/devtools/renderer_overrides_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698