| 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 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 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; | 487 virtual RenderWidgetHostImpl* AsRenderWidgetHostImpl() OVERRIDE; |
| 485 | 488 |
| 486 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT | 489 // Create a LatencyInfo struct with INPUT_EVENT_LATENCY_RWH_COMPONENT |
| 487 // component if it is not already in |original|. And if |original| is | 490 // component if it is not already in |original|. And if |original| is |
| 488 // not NULL, it is also merged into the resulting LatencyInfo. | 491 // not NULL, it is also merged into the resulting LatencyInfo. |
| (...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 std::list<HWND> dummy_windows_for_activation_; | 836 std::list<HWND> dummy_windows_for_activation_; |
| 834 #endif | 837 #endif |
| 835 | 838 |
| 836 int64 last_input_number_; | 839 int64 last_input_number_; |
| 837 | 840 |
| 838 int next_browser_snapshot_id_; | 841 int next_browser_snapshot_id_; |
| 839 typedef std::map<int, | 842 typedef std::map<int, |
| 840 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; | 843 base::Callback<void(const unsigned char*, size_t)> > PendingSnapshotMap; |
| 841 PendingSnapshotMap pending_browser_snapshots_; | 844 PendingSnapshotMap pending_browser_snapshots_; |
| 842 | 845 |
| 846 cc::RollingTimeDeltaHistory browser_composite_latency_history_; |
| 847 |
| 843 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; | 848 base::WeakPtrFactory<RenderWidgetHostImpl> weak_factory_; |
| 844 | 849 |
| 845 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); | 850 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostImpl); |
| 846 }; | 851 }; |
| 847 | 852 |
| 848 } // namespace content | 853 } // namespace content |
| 849 | 854 |
| 850 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ | 855 #endif // CONTENT_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_IMPL_H_ |
| OLD | NEW |