OLD | NEW |
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 <deque> | 8 #include <deque> |
9 #include <list> | 9 #include <list> |
10 #include <map> | 10 #include <map> |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput. | 430 // Called by RenderWidgetHostView in response to OnSetNeedsFlushInput. |
431 void FlushInput(); | 431 void FlushInput(); |
432 | 432 |
433 // InputRouterClient | 433 // InputRouterClient |
434 void SetNeedsFlush() override; | 434 void SetNeedsFlush() override; |
435 | 435 |
436 // Indicates whether the renderer drives the RenderWidgetHosts's size or the | 436 // Indicates whether the renderer drives the RenderWidgetHosts's size or the |
437 // other way around. | 437 // other way around. |
438 bool should_auto_resize() { return should_auto_resize_; } | 438 bool should_auto_resize() { return should_auto_resize_; } |
439 | 439 |
440 void ComputeTouchLatency(const ui::LatencyInfo& latency_info); | |
441 void FrameSwapped(const ui::LatencyInfo& latency_info); | 440 void FrameSwapped(const ui::LatencyInfo& latency_info); |
442 void DidReceiveRendererFrame(); | 441 void DidReceiveRendererFrame(); |
443 | 442 |
444 // Returns the ID that uniquely describes this component to the latency | 443 // Returns the ID that uniquely describes this component to the latency |
445 // subsystem. | 444 // subsystem. |
446 int64 GetLatencyComponentId(); | 445 int64 GetLatencyComponentId() const; |
447 | 446 |
448 static void CompositorFrameDrawn( | 447 static void CompositorFrameDrawn( |
449 const std::vector<ui::LatencyInfo>& latency_info); | 448 const std::vector<ui::LatencyInfo>& latency_info); |
450 | 449 |
451 // Don't check whether we expected a resize ack during layout tests. | 450 // Don't check whether we expected a resize ack during layout tests. |
452 static void DisableResizeAckCheckForTesting(); | 451 static void DisableResizeAckCheckForTesting(); |
453 | 452 |
454 void WindowSnapshotAsyncCallback( | 453 void WindowSnapshotAsyncCallback( |
455 int routing_id, | 454 int routing_id, |
456 int snapshot_id, | 455 int snapshot_id, |
(...skipping 19 matching lines...) Expand all Loading... |
476 #if defined(OS_WIN) | 475 #if defined(OS_WIN) |
477 gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 476 gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
478 #endif | 477 #endif |
479 | 478 |
480 protected: | 479 protected: |
481 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; | 480 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; |
482 | 481 |
483 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT | 482 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT |
484 // component if it is not already in |original|. And if |original| is | 483 // component if it is not already in |original|. And if |original| is |
485 // not NULL, it is also merged into the resulting LatencyInfo. | 484 // not NULL, it is also merged into the resulting LatencyInfo. |
486 ui::LatencyInfo CreateRWHLatencyInfoIfNotExist( | 485 ui::LatencyInfo CreateInputEventLatencyInfoIfNotExist( |
487 const ui::LatencyInfo* original, | 486 const ui::LatencyInfo* original, |
488 blink::WebInputEvent::Type type, | 487 blink::WebInputEvent::Type type, |
489 const ui::LatencyInfo::InputCoordinate* logical_coordinates, | 488 const ui::LatencyInfo::InputCoordinate* logical_coordinates, |
490 size_t logical_coordinates_size); | 489 size_t logical_coordinates_size); |
| 490 void ComputeInputLatencyHistograms( |
| 491 const char* event_type_name, |
| 492 const ui::LatencyInfo& latency_info) const; |
491 | 493 |
492 // Called when we receive a notification indicating that the renderer | 494 // Called when we receive a notification indicating that the renderer |
493 // process has gone. This will reset our state so that our state will be | 495 // process has gone. This will reset our state so that our state will be |
494 // consistent if a new renderer is created. | 496 // consistent if a new renderer is created. |
495 void RendererExited(base::TerminationStatus status, int exit_code); | 497 void RendererExited(base::TerminationStatus status, int exit_code); |
496 | 498 |
497 // Retrieves an id the renderer can use to refer to its view. | 499 // Retrieves an id the renderer can use to refer to its view. |
498 // This is used for various IPC messages, including plugins. | 500 // This is used for various IPC messages, including plugins. |
499 gfx::NativeViewId GetNativeViewId() const; | 501 gfx::NativeViewId GetNativeViewId() const; |
500 | 502 |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 cc::RollingTimeDeltaHistory browser_composite_latency_history_; | 844 cc::RollingTimeDeltaHistory browser_composite_latency_history_; |
843 | 845 |
844 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 846 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
845 | 847 |
846 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 848 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
847 }; | 849 }; |
848 | 850 |
849 } // namespace content | 851 } // namespace content |
850 | 852 |
851 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 853 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |