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

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

Issue 2898793002: DevTools: disable input event processing while auditing with lighthouse. (Closed)
Patch Set: comments addressed 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 Response EmulateTouchFromMouseEvent(const std::string& type, 68 Response EmulateTouchFromMouseEvent(const std::string& type,
69 int x, 69 int x,
70 int y, 70 int y,
71 double timestamp, 71 double timestamp,
72 const std::string& button, 72 const std::string& button,
73 Maybe<double> delta_x, 73 Maybe<double> delta_x,
74 Maybe<double> delta_y, 74 Maybe<double> delta_y,
75 Maybe<int> modifiers, 75 Maybe<int> modifiers,
76 Maybe<int> click_count) override; 76 Maybe<int> click_count) override;
77 77
78 Response SetIgnoreInputEvents(bool ignore) override;
79
78 void SynthesizePinchGesture( 80 void SynthesizePinchGesture(
79 int x, 81 int x,
80 int y, 82 int y,
81 double scale_factor, 83 double scale_factor,
82 Maybe<int> relative_speed, 84 Maybe<int> relative_speed,
83 Maybe<std::string> gesture_source_type, 85 Maybe<std::string> gesture_source_type,
84 std::unique_ptr<SynthesizePinchGestureCallback> callback) override; 86 std::unique_ptr<SynthesizePinchGestureCallback> callback) override;
85 87
86 void SynthesizeScrollGesture( 88 void SynthesizeScrollGesture(
87 int x, 89 int x,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 RenderFrameHostImpl* host_; 136 RenderFrameHostImpl* host_;
135 // Callbacks for calls to Input.dispatchKey/MouseEvent that have been sent to 137 // Callbacks for calls to Input.dispatchKey/MouseEvent that have been sent to
136 // the renderer, but that we haven't yet received an ack for. 138 // the renderer, but that we haven't yet received an ack for.
137 bool input_queued_; 139 bool input_queued_;
138 std::deque<std::unique_ptr<DispatchKeyEventCallback>> pending_key_callbacks_; 140 std::deque<std::unique_ptr<DispatchKeyEventCallback>> pending_key_callbacks_;
139 std::deque<std::unique_ptr<DispatchMouseEventCallback>> 141 std::deque<std::unique_ptr<DispatchMouseEventCallback>>
140 pending_mouse_callbacks_; 142 pending_mouse_callbacks_;
141 float page_scale_factor_; 143 float page_scale_factor_;
142 gfx::SizeF scrollable_viewport_size_; 144 gfx::SizeF scrollable_viewport_size_;
143 int last_id_; 145 int last_id_;
146 bool ignore_input_events_ = false;
144 base::WeakPtrFactory<InputHandler> weak_factory_; 147 base::WeakPtrFactory<InputHandler> weak_factory_;
145 148
146 DISALLOW_COPY_AND_ASSIGN(InputHandler); 149 DISALLOW_COPY_AND_ASSIGN(InputHandler);
147 }; 150 };
148 151
149 } // namespace protocol 152 } // namespace protocol
150 } // namespace content 153 } // namespace content
151 154
152 #endif // CONTENT_BROWSER_DEVTOOLS_PROTOCOL_INPUT_HANDLER_H_ 155 #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