| 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 #include "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <tuple> | 10 #include <tuple> |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" | 42 #include "content/browser/renderer_host/input/synthetic_gesture_controller.h" |
| 43 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" | 43 #include "content/browser/renderer_host/input/synthetic_gesture_target.h" |
| 44 #include "content/browser/renderer_host/input/timeout_monitor.h" | 44 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 45 #include "content/browser/renderer_host/input/touch_emulator.h" | 45 #include "content/browser/renderer_host/input/touch_emulator.h" |
| 46 #include "content/browser/renderer_host/render_process_host_impl.h" | 46 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 47 #include "content/browser/renderer_host/render_view_host_impl.h" | 47 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 48 #include "content/browser/renderer_host/render_widget_helper.h" | 48 #include "content/browser/renderer_host/render_widget_helper.h" |
| 49 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 49 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 50 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" | 50 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" |
| 51 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 51 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 52 #include "content/browser/service_worker/service_worker_context_wrapper.h" |
| 52 #include "content/common/content_constants_internal.h" | 53 #include "content/common/content_constants_internal.h" |
| 53 #include "content/common/content_switches_internal.h" | 54 #include "content/common/content_switches_internal.h" |
| 54 #include "content/common/cursors/webcursor.h" | 55 #include "content/common/cursors/webcursor.h" |
| 55 #include "content/common/frame_messages.h" | 56 #include "content/common/frame_messages.h" |
| 56 #include "content/common/host_shared_bitmap_manager.h" | 57 #include "content/common/host_shared_bitmap_manager.h" |
| 57 #include "content/common/input_messages.h" | 58 #include "content/common/input_messages.h" |
| 58 #include "content/common/resize_params.h" | 59 #include "content/common/resize_params.h" |
| 59 #include "content/common/text_input_state.h" | 60 #include "content/common/text_input_state.h" |
| 60 #include "content/common/view_messages.h" | 61 #include "content/common/view_messages.h" |
| 61 #include "content/public/browser/native_web_keyboard_event.h" | 62 #include "content/public/browser/native_web_keyboard_event.h" |
| 62 #include "content/public/browser/notification_service.h" | 63 #include "content/public/browser/notification_service.h" |
| 63 #include "content/public/browser/notification_types.h" | 64 #include "content/public/browser/notification_types.h" |
| 64 #include "content/public/browser/render_widget_host_iterator.h" | 65 #include "content/public/browser/render_widget_host_iterator.h" |
| 66 #include "content/public/browser/storage_partition.h" |
| 65 #include "content/public/common/content_constants.h" | 67 #include "content/public/common/content_constants.h" |
| 66 #include "content/public/common/content_switches.h" | 68 #include "content/public/common/content_switches.h" |
| 67 #include "content/public/common/result_codes.h" | 69 #include "content/public/common/result_codes.h" |
| 68 #include "content/public/common/web_preferences.h" | 70 #include "content/public/common/web_preferences.h" |
| 69 #include "gpu/GLES2/gl2extchromium.h" | 71 #include "gpu/GLES2/gl2extchromium.h" |
| 70 #include "gpu/command_buffer/service/gpu_switches.h" | 72 #include "gpu/command_buffer/service/gpu_switches.h" |
| 71 #include "gpu/ipc/common/gpu_messages.h" | 73 #include "gpu/ipc/common/gpu_messages.h" |
| 72 #include "skia/ext/image_operations.h" | 74 #include "skia/ext/image_operations.h" |
| 73 #include "skia/ext/platform_canvas.h" | 75 #include "skia/ext/platform_canvas.h" |
| 74 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" | 76 #include "third_party/WebKit/public/web/WebCompositionUnderline.h" |
| (...skipping 2004 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2079 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 2081 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 2080 FROM_HERE, | 2082 FROM_HERE, |
| 2081 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, | 2083 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, |
| 2082 weak_factory_.GetWeakPtr(), sequence_number), | 2084 weak_factory_.GetWeakPtr(), sequence_number), |
| 2083 base::TimeDelta::FromSecondsD(1. / 6)); | 2085 base::TimeDelta::FromSecondsD(1. / 6)); |
| 2084 #else | 2086 #else |
| 2085 WindowSnapshotReachedScreen(sequence_number); | 2087 WindowSnapshotReachedScreen(sequence_number); |
| 2086 #endif | 2088 #endif |
| 2087 } | 2089 } |
| 2088 | 2090 |
| 2089 latency_tracker_.OnFrameSwapped(latency_info); | 2091 const bool is_running_navigation_hint_task = |
| 2092 static_cast<ServiceWorkerContextWrapper*>( |
| 2093 GetProcess()->GetStoragePartition()->GetServiceWorkerContext()) |
| 2094 ->IsRunningNavigationHintTask(GetProcess()->GetID()); |
| 2095 latency_tracker_.OnFrameSwapped(latency_info, |
| 2096 is_running_navigation_hint_task); |
| 2090 } | 2097 } |
| 2091 | 2098 |
| 2092 void RenderWidgetHostImpl::DidReceiveRendererFrame() { | 2099 void RenderWidgetHostImpl::DidReceiveRendererFrame() { |
| 2093 view_->DidReceiveRendererFrame(); | 2100 view_->DidReceiveRendererFrame(); |
| 2094 } | 2101 } |
| 2095 | 2102 |
| 2096 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { | 2103 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { |
| 2097 DCHECK(base::MessageLoopForUI::IsCurrent()); | 2104 DCHECK(base::MessageLoopForUI::IsCurrent()); |
| 2098 | 2105 |
| 2099 gfx::Rect view_bounds = GetView()->GetViewBounds(); | 2106 gfx::Rect view_bounds = GetView()->GetViewBounds(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2174 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2181 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2175 } | 2182 } |
| 2176 | 2183 |
| 2177 BrowserAccessibilityManager* | 2184 BrowserAccessibilityManager* |
| 2178 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2185 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2179 return delegate_ ? | 2186 return delegate_ ? |
| 2180 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2187 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2181 } | 2188 } |
| 2182 | 2189 |
| 2183 } // namespace content | 2190 } // namespace content |
| OLD | NEW |