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> |
11 #include <queue> | 11 #include <queue> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/gtest_prod_util.h" | 17 #include "base/gtest_prod_util.h" |
18 #include "base/memory/scoped_ptr.h" | 18 #include "base/memory/scoped_ptr.h" |
19 #include "base/memory/weak_ptr.h" | 19 #include "base/memory/weak_ptr.h" |
20 #include "base/observer_list.h" | 20 #include "base/observer_list.h" |
21 #include "base/process/kill.h" | 21 #include "base/process/kill.h" |
22 #include "base/strings/string16.h" | 22 #include "base/strings/string16.h" |
23 #include "base/time/time.h" | 23 #include "base/time/time.h" |
24 #include "base/timer/timer.h" | 24 #include "base/timer/timer.h" |
25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 26 #include "cc/base/rolling_time_delta_history.h" |
26 #include "cc/resources/shared_bitmap.h" | 27 #include "cc/resources/shared_bitmap.h" |
27 #include "content/browser/renderer_host/event_with_latency_info.h" | 28 #include "content/browser/renderer_host/event_with_latency_info.h" |
28 #include "content/browser/renderer_host/input/input_ack_handler.h" | 29 #include "content/browser/renderer_host/input/input_ack_handler.h" |
29 #include "content/browser/renderer_host/input/input_router_client.h" | 30 #include "content/browser/renderer_host/input/input_router_client.h" |
30 #include "content/browser/renderer_host/input/synthetic_gesture.h" | 31 #include "content/browser/renderer_host/input/synthetic_gesture.h" |
31 #include "content/browser/renderer_host/input/touch_emulator_client.h" | 32 #include "content/browser/renderer_host/input/touch_emulator_client.h" |
32 #include "content/common/input/input_event_ack_state.h" | 33 #include "content/common/input/input_event_ack_state.h" |
33 #include "content/common/input/synthetic_gesture_packet.h" | 34 #include "content/common/input/synthetic_gesture_packet.h" |
34 #include "content/common/view_message_enums.h" | 35 #include "content/common/view_message_enums.h" |
35 #include "content/public/browser/render_widget_host.h" | 36 #include "content/public/browser/render_widget_host.h" |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
476 | 477 |
477 InputRouter* input_router() { return input_router_.get(); } | 478 InputRouter* input_router() { return input_router_.get(); } |
478 | 479 |
479 // Get the BrowserAccessibilityManager for the root of the frame tree, | 480 // Get the BrowserAccessibilityManager for the root of the frame tree, |
480 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); | 481 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); |
481 | 482 |
482 // Get the BrowserAccessibilityManager for the root of the frame tree, | 483 // Get the BrowserAccessibilityManager for the root of the frame tree, |
483 // or create it if it doesn't already exist. | 484 // or create it if it doesn't already exist. |
484 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); | 485 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); |
485 | 486 |
| 487 base::TimeDelta GetEstimatedBrowserCompositeTime(); |
| 488 |
486 #if defined(OS_WIN) | 489 #if defined(OS_WIN) |
487 gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 490 gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
488 #endif | 491 #endif |
489 | 492 |
490 protected: | 493 protected: |
491 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; | 494 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; |
492 | 495 |
493 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT | 496 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT |
494 // component if it is not already in |original|. And if |original| is | 497 // component if it is not already in |original|. And if |original| is |
495 // not NULL, it is also merged into the resulting LatencyInfo. | 498 // not NULL, it is also merged into the resulting LatencyInfo. |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
839 std::list<HWND> dummy_windows_for_activation_; | 842 std::list<HWND> dummy_windows_for_activation_; |
840 #endif | 843 #endif |
841 | 844 |
842 int64 last_input_number_; | 845 int64 last_input_number_; |
843 | 846 |
844 int next_browser_snapshot_id_; | 847 int next_browser_snapshot_id_; |
845 typedef std::map<int, | 848 typedef std::map<int, |
846 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 849 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
847 PendingSnapshotMap pending_browser_snapshots_; | 850 PendingSnapshotMap pending_browser_snapshots_; |
848 | 851 |
| 852 cc::RollingTimeDeltaHistory browser_composite_latency_history_; |
| 853 |
849 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 854 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
850 }; | 855 }; |
851 | 856 |
852 } // namespace content | 857 } // namespace content |
853 | 858 |
854 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 859 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |