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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.h

Issue 2756893002: Add Keyboard Latency UMA Metrics. (Closed)
Patch Set: mfomitchev responses, rebase 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 cc::FrameSinkId AllocateFrameSinkId(bool is_guest_view_hack); 148 cc::FrameSinkId AllocateFrameSinkId(bool is_guest_view_hack);
149 149
150 // RenderWidgetHost implementation. 150 // RenderWidgetHost implementation.
151 void UpdateTextDirection(blink::WebTextDirection direction) override; 151 void UpdateTextDirection(blink::WebTextDirection direction) override;
152 void NotifyTextDirection() override; 152 void NotifyTextDirection() override;
153 void Focus() override; 153 void Focus() override;
154 void Blur() override; 154 void Blur() override;
155 void SetActive(bool active) override; 155 void SetActive(bool active) override;
156 void ForwardMouseEvent(const blink::WebMouseEvent& mouse_event) override; 156 void ForwardMouseEvent(const blink::WebMouseEvent& mouse_event) override;
157 void ForwardWheelEvent(const blink::WebMouseWheelEvent& wheel_event) override; 157 void ForwardWheelEvent(const blink::WebMouseWheelEvent& wheel_event) override;
158 void ForwardKeyboardEvent(const NativeWebKeyboardEvent& key_event) override; 158 void ForwardKeyboardEventWithLatencyInfo(
159 const NativeWebKeyboardEvent& key_event,
160 const ui::LatencyInfo& latency) override;
159 void ForwardGestureEvent( 161 void ForwardGestureEvent(
160 const blink::WebGestureEvent& gesture_event) override; 162 const blink::WebGestureEvent& gesture_event) override;
161 RenderProcessHost* GetProcess() const override; 163 RenderProcessHost* GetProcess() const override;
162 int GetRoutingID() const override; 164 int GetRoutingID() const override;
163 RenderWidgetHostViewBase* GetView() const override; 165 RenderWidgetHostViewBase* GetView() const override;
164 bool IsLoading() const override; 166 bool IsLoading() const override;
165 void RestartHangMonitorTimeoutIfNecessary() override; 167 void RestartHangMonitorTimeoutIfNecessary() override;
166 void SetIgnoreInputEvents(bool ignore_input_events) override; 168 void SetIgnoreInputEvents(bool ignore_input_events) override;
167 void WasResized() override; 169 void WasResized() override;
168 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override; 170 void AddKeyPressEventCallback(const KeyPressEventCallback& callback) override;
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 // |next_source_id| to be discarded. 340 // |next_source_id| to be discarded.
339 void StartNewContentRenderingTimeout(uint32_t next_source_id); 341 void StartNewContentRenderingTimeout(uint32_t next_source_id);
340 342
341 // Forwards the keyboard event with optional commands to the renderer. If 343 // Forwards the keyboard event with optional commands to the renderer. If
342 // |key_event| is not forwarded for any reason, then |commands| are ignored. 344 // |key_event| is not forwarded for any reason, then |commands| are ignored.
343 // |update_event| (if non-null) is set to indicate whether the underlying 345 // |update_event| (if non-null) is set to indicate whether the underlying
344 // event in |key_event| should be updated. |update_event| is only used on 346 // event in |key_event| should be updated. |update_event| is only used on
345 // aura. 347 // aura.
346 void ForwardKeyboardEventWithCommands( 348 void ForwardKeyboardEventWithCommands(
347 const NativeWebKeyboardEvent& key_event, 349 const NativeWebKeyboardEvent& key_event,
350 const ui::LatencyInfo& latency,
348 const std::vector<EditCommand>* commands, 351 const std::vector<EditCommand>* commands,
349 bool* update_event = nullptr); 352 bool* update_event = nullptr);
350 353
351 // Forwards the given message to the renderer. These are called by the view 354 // Forwards the given message to the renderer. These are called by the view
352 // when it has received a message. 355 // when it has received a message.
353 void ForwardGestureEventWithLatencyInfo( 356 void ForwardGestureEventWithLatencyInfo(
354 const blink::WebGestureEvent& gesture_event, 357 const blink::WebGestureEvent& gesture_event,
355 const ui::LatencyInfo& ui_latency) override; 358 const ui::LatencyInfo& latency) override;
356 virtual void ForwardTouchEventWithLatencyInfo( 359 virtual void ForwardTouchEventWithLatencyInfo(
357 const blink::WebTouchEvent& touch_event, 360 const blink::WebTouchEvent& touch_event,
358 const ui::LatencyInfo& ui_latency); // Virtual for testing. 361 const ui::LatencyInfo& latency); // Virtual for testing.
359 void ForwardMouseEventWithLatencyInfo( 362 void ForwardMouseEventWithLatencyInfo(const blink::WebMouseEvent& mouse_event,
360 const blink::WebMouseEvent& mouse_event, 363 const ui::LatencyInfo& latency);
361 const ui::LatencyInfo& ui_latency);
362 virtual void ForwardWheelEventWithLatencyInfo( 364 virtual void ForwardWheelEventWithLatencyInfo(
363 const blink::WebMouseWheelEvent& wheel_event, 365 const blink::WebMouseWheelEvent& wheel_event,
364 const ui::LatencyInfo& ui_latency); // Virtual for testing. 366 const ui::LatencyInfo& latency); // Virtual for testing.
365 367
366 // Enables/disables touch emulation using mouse event. See TouchEmulator. 368 // Enables/disables touch emulation using mouse event. See TouchEmulator.
367 void SetTouchEventEmulationEnabled( 369 void SetTouchEventEmulationEnabled(
368 bool enabled, ui::GestureProviderConfigType config_type); 370 bool enabled, ui::GestureProviderConfigType config_type);
369 371
370 // TouchEmulatorClient implementation. 372 // TouchEmulatorClient implementation.
371 void ForwardEmulatedGestureEvent( 373 void ForwardEmulatedGestureEvent(
372 const blink::WebGestureEvent& gesture_event) override; 374 const blink::WebGestureEvent& gesture_event) override;
373 void ForwardEmulatedTouchEvent( 375 void ForwardEmulatedTouchEvent(
374 const blink::WebTouchEvent& touch_event) override; 376 const blink::WebTouchEvent& touch_event) override;
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_; 983 std::queue<std::pair<uint32_t, std::vector<IPC::Message>>> queued_messages_;
982 984
983 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; 985 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_;
984 986
985 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); 987 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl);
986 }; 988 };
987 989
988 } // namespace content 990 } // namespace content
989 991
990 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ 992 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698