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

Side by Side Diff: content/browser/devtools/protocol/input_handler.h

Issue 1299643004: Make synthesizeScrollGesture repetable and emit interaction markers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Oh it has to be a 3-sided patch Created 5 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_PROTOCOL_INPUT_HANDLER_H_ 5 #ifndef CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 6 #define CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h" 9 #include "content/browser/devtools/protocol/devtools_protocol_dispatcher.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture.h"
11 #include "content/common/input/synthetic_smooth_scroll_gesture_params.h"
11 #include "ui/gfx/geometry/size_f.h" 12 #include "ui/gfx/geometry/size_f.h"
12 13
13 namespace cc { 14 namespace cc {
14 class CompositorFrameMetadata; 15 class CompositorFrameMetadata;
15 } 16 }
16 17
17 namespace gfx { 18 namespace gfx {
18 class Point; 19 class Point;
19 } 20 }
20 21
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 int* modifiers, 69 int* modifiers,
69 int* click_count); 70 int* click_count);
70 71
71 Response SynthesizePinchGesture(DevToolsCommandId command_id, 72 Response SynthesizePinchGesture(DevToolsCommandId command_id,
72 int x, 73 int x,
73 int y, 74 int y,
74 double scale_factor, 75 double scale_factor,
75 const int* relative_speed, 76 const int* relative_speed,
76 const std::string* gesture_source_type); 77 const std::string* gesture_source_type);
77 78
79 // TODO(alexclarke): remove this once the protocol patch lands.
78 Response SynthesizeScrollGesture(DevToolsCommandId command_id, 80 Response SynthesizeScrollGesture(DevToolsCommandId command_id,
79 int x, 81 int x,
80 int y, 82 int y,
81 const int* x_distance, 83 const int* x_distance,
82 const int* y_distance, 84 const int* y_distance,
83 const int* x_overscroll, 85 const int* x_overscroll,
84 const int* y_overscroll, 86 const int* y_overscroll,
85 const bool* prevent_fling, 87 const bool* prevent_fling,
86 const int* speed, 88 const int* speed,
87 const std::string* gesture_source_type); 89 const std::string* gesture_source_type);
88 90
91 Response SynthesizeScrollGesture(DevToolsCommandId command_id,
92 int x,
93 int y,
94 const int* x_distance,
95 const int* y_distance,
96 const int* x_overscroll,
97 const int* y_overscroll,
98 const bool* prevent_fling,
99 const int* speed,
100 const std::string* gesture_source_type,
101 const int* repeat_count,
102 const int* repeat_delay_ms,
103 const std::string* interaction_marker_name);
104
89 Response SynthesizeTapGesture(DevToolsCommandId command_id, 105 Response SynthesizeTapGesture(DevToolsCommandId command_id,
90 int x, 106 int x,
91 int y, 107 int y,
92 const int* duration, 108 const int* duration,
93 const int* tap_count, 109 const int* tap_count,
94 const std::string* gesture_source_type); 110 const std::string* gesture_source_type);
95 111
96 private: 112 private:
97 void SendSynthesizePinchGestureResponse(DevToolsCommandId command_id, 113 void SendSynthesizePinchGestureResponse(DevToolsCommandId command_id,
98 SyntheticGesture::Result result); 114 SyntheticGesture::Result result);
99 115
100 void SendSynthesizeScrollGestureResponse(DevToolsCommandId command_id, 116 void SendSynthesizeScrollGestureResponse(DevToolsCommandId command_id,
101 SyntheticGesture::Result result); 117 SyntheticGesture::Result result);
102 118
103 void SendSynthesizeTapGestureResponse(DevToolsCommandId command_id, 119 void SendSynthesizeTapGestureResponse(DevToolsCommandId command_id,
104 bool send_success, 120 bool send_success,
105 SyntheticGesture::Result result); 121 SyntheticGesture::Result result);
106 122
123 void SynthesizeRepeatingScroll(
124 SyntheticSmoothScrollGestureParams gesture_params,
125 int repeat_count,
126 base::TimeDelta repeat_delay,
127 std::string interaction_marker_name,
128 DevToolsCommandId command_id);
129
130 void OnScrollFinished(SyntheticSmoothScrollGestureParams gesture_params,
131 int repeat_count,
132 base::TimeDelta repeat_delay,
133 std::string interaction_marker_name,
134 DevToolsCommandId command_id,
135 SyntheticGesture::Result result);
136
107 RenderWidgetHostImpl* host_; 137 RenderWidgetHostImpl* host_;
108 scoped_ptr<Client> client_; 138 scoped_ptr<Client> client_;
109 float page_scale_factor_; 139 float page_scale_factor_;
110 gfx::SizeF scrollable_viewport_size_; 140 gfx::SizeF scrollable_viewport_size_;
111 base::WeakPtrFactory<InputHandler> weak_factory_; 141 base::WeakPtrFactory<InputHandler> weak_factory_;
112 142
113 DISALLOW_COPY_AND_ASSIGN(InputHandler); 143 DISALLOW_COPY_AND_ASSIGN(InputHandler);
114 }; 144 };
115 145
116 } // namespace input 146 } // namespace input
117 } // namespace devtools 147 } // namespace devtools
118 } // namespace content 148 } // namespace content
119 149
120 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 150 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/devtools/protocol/input_handler.cc » ('j') | content/browser/devtools/protocol/input_handler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698