| 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 2003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 2080 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 2079 FROM_HERE, | 2081 FROM_HERE, |
| 2080 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, | 2082 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, |
| 2081 weak_factory_.GetWeakPtr(), sequence_number), | 2083 weak_factory_.GetWeakPtr(), sequence_number), |
| 2082 base::TimeDelta::FromSecondsD(1. / 6)); | 2084 base::TimeDelta::FromSecondsD(1. / 6)); |
| 2083 #else | 2085 #else |
| 2084 WindowSnapshotReachedScreen(sequence_number); | 2086 WindowSnapshotReachedScreen(sequence_number); |
| 2085 #endif | 2087 #endif |
| 2086 } | 2088 } |
| 2087 | 2089 |
| 2088 latency_tracker_.OnFrameSwapped(latency_info); | 2090 const bool is_running_navigation_hint_task = |
| 2091 static_cast<ServiceWorkerContextWrapper*>( |
| 2092 GetProcess()->GetStoragePartition()->GetServiceWorkerContext()) |
| 2093 ->IsRunningNavigationHintTask(GetProcess()->GetID()); |
| 2094 latency_tracker_.OnFrameSwapped(latency_info, |
| 2095 is_running_navigation_hint_task); |
| 2089 } | 2096 } |
| 2090 | 2097 |
| 2091 void RenderWidgetHostImpl::DidReceiveRendererFrame() { | 2098 void RenderWidgetHostImpl::DidReceiveRendererFrame() { |
| 2092 view_->DidReceiveRendererFrame(); | 2099 view_->DidReceiveRendererFrame(); |
| 2093 } | 2100 } |
| 2094 | 2101 |
| 2095 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { | 2102 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { |
| 2096 DCHECK(base::MessageLoopForUI::IsCurrent()); | 2103 DCHECK(base::MessageLoopForUI::IsCurrent()); |
| 2097 | 2104 |
| 2098 gfx::Rect view_bounds = GetView()->GetViewBounds(); | 2105 gfx::Rect view_bounds = GetView()->GetViewBounds(); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2173 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; | 2180 return delegate_ ? delegate_->GetRootBrowserAccessibilityManager() : NULL; |
| 2174 } | 2181 } |
| 2175 | 2182 |
| 2176 BrowserAccessibilityManager* | 2183 BrowserAccessibilityManager* |
| 2177 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { | 2184 RenderWidgetHostImpl::GetOrCreateRootBrowserAccessibilityManager() { |
| 2178 return delegate_ ? | 2185 return delegate_ ? |
| 2179 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; | 2186 delegate_->GetOrCreateRootBrowserAccessibilityManager() : NULL; |
| 2180 } | 2187 } |
| 2181 | 2188 |
| 2182 } // namespace content | 2189 } // namespace content |
| OLD | NEW |