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/browser/renderer_host/render_widget_host_latency_tracker.h" | 33 #include "content/browser/renderer_host/render_widget_host_latency_tracker.h" |
33 #include "content/common/input/input_event_ack_state.h" | 34 #include "content/common/input/input_event_ack_state.h" |
34 #include "content/common/input/synthetic_gesture_packet.h" | 35 #include "content/common/input/synthetic_gesture_packet.h" |
35 #include "content/common/view_message_enums.h" | 36 #include "content/common/view_message_enums.h" |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 | 470 |
470 InputRouter* input_router() { return input_router_.get(); } | 471 InputRouter* input_router() { return input_router_.get(); } |
471 | 472 |
472 // Get the BrowserAccessibilityManager for the root of the frame tree, | 473 // Get the BrowserAccessibilityManager for the root of the frame tree, |
473 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); | 474 BrowserAccessibilityManager* GetRootBrowserAccessibilityManager(); |
474 | 475 |
475 // Get the BrowserAccessibilityManager for the root of the frame tree, | 476 // Get the BrowserAccessibilityManager for the root of the frame tree, |
476 // or create it if it doesn't already exist. | 477 // or create it if it doesn't already exist. |
477 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); | 478 BrowserAccessibilityManager* GetOrCreateRootBrowserAccessibilityManager(); |
478 | 479 |
| 480 base::TimeDelta GetEstimatedBrowserCompositeTime(); |
| 481 |
479 #if defined(OS_WIN) | 482 #if defined(OS_WIN) |
480 gfx::NativeViewAccessible GetParentNativeViewAccessible(); | 483 gfx::NativeViewAccessible GetParentNativeViewAccessible(); |
481 #endif | 484 #endif |
482 | 485 |
483 protected: | 486 protected: |
484 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; | 487 RenderWidgetHostImpl* AsRenderWidgetHostImpl() override; |
485 | 488 |
486 // Called when we receive a notification indicating that the renderer | 489 // Called when we receive a notification indicating that the renderer |
487 // process has gone. This will reset our state so that our state will be | 490 // process has gone. This will reset our state so that our state will be |
488 // consistent if a new renderer is created. | 491 // consistent if a new renderer is created. |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 std::list<HWND> dummy_windows_for_activation_; | 819 std::list<HWND> dummy_windows_for_activation_; |
817 #endif | 820 #endif |
818 | 821 |
819 RenderWidgetHostLatencyTracker latency_tracker_; | 822 RenderWidgetHostLatencyTracker latency_tracker_; |
820 | 823 |
821 int next_browser_snapshot_id_; | 824 int next_browser_snapshot_id_; |
822 typedef std::map<int, | 825 typedef std::map<int, |
823 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 826 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
824 PendingSnapshotMap pending_browser_snapshots_; | 827 PendingSnapshotMap pending_browser_snapshots_; |
825 | 828 |
| 829 cc::RollingTimeDeltaHistory browser_composite_latency_history_; |
| 830 |
826 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 831 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
827 | 832 |
828 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 833 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
829 }; | 834 }; |
830 | 835 |
831 } // namespace content | 836 } // namespace content |
832 | 837 |
833 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 838 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
OLD | NEW |