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

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

Issue 2868943004: Validate input from devtools channel to ensure that position is valid. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | content/browser/devtools/protocol/input_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "content/browser/devtools/protocol/devtools_domain_handler.h" 10 #include "content/browser/devtools/protocol/devtools_domain_handler.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void OnScrollFinished( 122 void OnScrollFinished(
123 SyntheticSmoothScrollGestureParams gesture_params, 123 SyntheticSmoothScrollGestureParams gesture_params,
124 int repeat_count, 124 int repeat_count,
125 base::TimeDelta repeat_delay, 125 base::TimeDelta repeat_delay,
126 std::string interaction_marker_name, 126 std::string interaction_marker_name,
127 int id, 127 int id,
128 std::unique_ptr<SynthesizeScrollGestureCallback> callback, 128 std::unique_ptr<SynthesizeScrollGestureCallback> callback,
129 SyntheticGesture::Result result); 129 SyntheticGesture::Result result);
130 130
131 void ClearPendingKeyAndMouseCallbacks(); 131 void ClearPendingKeyAndMouseCallbacks();
132 bool PointIsWithinContents(gfx::PointF) const;
dgozman 2017/05/09 21:38:55 IIRC, chromium mandates parameter names.
dtapuska 2017/05/10 14:05:03 Done.
132 133
133 RenderFrameHostImpl* host_; 134 RenderFrameHostImpl* host_;
134 // Callbacks for calls to Input.dispatchKey/MouseEvent that have been sent to 135 // Callbacks for calls to Input.dispatchKey/MouseEvent that have been sent to
135 // the renderer, but that we haven't yet received an ack for. 136 // the renderer, but that we haven't yet received an ack for.
136 bool input_queued_; 137 bool input_queued_;
137 std::deque<std::unique_ptr<DispatchKeyEventCallback>> pending_key_callbacks_; 138 std::deque<std::unique_ptr<DispatchKeyEventCallback>> pending_key_callbacks_;
138 std::deque<std::unique_ptr<DispatchMouseEventCallback>> 139 std::deque<std::unique_ptr<DispatchMouseEventCallback>>
139 pending_mouse_callbacks_; 140 pending_mouse_callbacks_;
140 float page_scale_factor_; 141 float page_scale_factor_;
141 gfx::SizeF scrollable_viewport_size_; 142 gfx::SizeF scrollable_viewport_size_;
142 int last_id_; 143 int last_id_;
143 base::WeakPtrFactory<InputHandler> weak_factory_; 144 base::WeakPtrFactory<InputHandler> weak_factory_;
144 145
145 DISALLOW_COPY_AND_ASSIGN(InputHandler); 146 DISALLOW_COPY_AND_ASSIGN(InputHandler);
146 }; 147 };
147 148
148 } // namespace protocol 149 } // namespace protocol
149 } // namespace content 150 } // namespace content
150 151
151 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 152 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698