| 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 #include "content/browser/renderer_host/input/timeout_monitor.h" | 45 #include "content/browser/renderer_host/input/timeout_monitor.h" |
| 46 #include "content/browser/renderer_host/input/touch_emulator.h" | 46 #include "content/browser/renderer_host/input/touch_emulator.h" |
| 47 #include "content/browser/renderer_host/render_process_host_impl.h" | 47 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 48 #include "content/browser/renderer_host/render_view_host_delegate.h" | 48 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
| 50 #include "content/browser/renderer_host/render_view_host_impl.h" | 50 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 51 #include "content/browser/renderer_host/render_widget_helper.h" | 51 #include "content/browser/renderer_host/render_widget_helper.h" |
| 52 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" | 52 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" |
| 53 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" | 53 #include "content/browser/renderer_host/render_widget_host_owner_delegate.h" |
| 54 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 54 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
| 55 #include "content/browser/service_worker/service_worker_context_wrapper.h" | |
| 56 #include "content/common/content_constants_internal.h" | 55 #include "content/common/content_constants_internal.h" |
| 57 #include "content/common/content_switches_internal.h" | 56 #include "content/common/content_switches_internal.h" |
| 58 #include "content/common/cursors/webcursor.h" | 57 #include "content/common/cursors/webcursor.h" |
| 59 #include "content/common/drag_messages.h" | 58 #include "content/common/drag_messages.h" |
| 60 #include "content/common/frame_messages.h" | 59 #include "content/common/frame_messages.h" |
| 61 #include "content/common/host_shared_bitmap_manager.h" | 60 #include "content/common/host_shared_bitmap_manager.h" |
| 62 #include "content/common/input_messages.h" | 61 #include "content/common/input_messages.h" |
| 63 #include "content/common/resize_params.h" | 62 #include "content/common/resize_params.h" |
| 64 #include "content/common/text_input_state.h" | 63 #include "content/common/text_input_state.h" |
| 65 #include "content/common/view_messages.h" | 64 #include "content/common/view_messages.h" |
| (...skipping 2358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2424 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( | 2423 base::ThreadTaskRunnerHandle::Get()->PostDelayedTask( |
| 2425 FROM_HERE, | 2424 FROM_HERE, |
| 2426 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, | 2425 base::Bind(&RenderWidgetHostImpl::WindowSnapshotReachedScreen, |
| 2427 weak_factory_.GetWeakPtr(), sequence_number), | 2426 weak_factory_.GetWeakPtr(), sequence_number), |
| 2428 base::TimeDelta::FromSecondsD(1. / 6)); | 2427 base::TimeDelta::FromSecondsD(1. / 6)); |
| 2429 #else | 2428 #else |
| 2430 WindowSnapshotReachedScreen(sequence_number); | 2429 WindowSnapshotReachedScreen(sequence_number); |
| 2431 #endif | 2430 #endif |
| 2432 } | 2431 } |
| 2433 | 2432 |
| 2434 const bool is_running_navigation_hint_task = | 2433 latency_tracker_.OnFrameSwapped(latency_info); |
| 2435 static_cast<ServiceWorkerContextWrapper*>( | |
| 2436 GetProcess()->GetStoragePartition()->GetServiceWorkerContext()) | |
| 2437 ->IsRunningNavigationHintTask(GetProcess()->GetID()); | |
| 2438 latency_tracker_.OnFrameSwapped(latency_info, | |
| 2439 is_running_navigation_hint_task); | |
| 2440 } | 2434 } |
| 2441 | 2435 |
| 2442 void RenderWidgetHostImpl::DidReceiveRendererFrame() { | 2436 void RenderWidgetHostImpl::DidReceiveRendererFrame() { |
| 2443 view_->DidReceiveRendererFrame(); | 2437 view_->DidReceiveRendererFrame(); |
| 2444 } | 2438 } |
| 2445 | 2439 |
| 2446 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { | 2440 void RenderWidgetHostImpl::WindowSnapshotReachedScreen(int snapshot_id) { |
| 2447 DCHECK(base::MessageLoopForUI::IsCurrent()); | 2441 DCHECK(base::MessageLoopForUI::IsCurrent()); |
| 2448 | 2442 |
| 2449 if (!pending_surface_browser_snapshots_.empty()) { | 2443 if (!pending_surface_browser_snapshots_.empty()) { |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2650 void RenderWidgetHostImpl::RequestCompositionUpdates(bool immediate_request, | 2644 void RenderWidgetHostImpl::RequestCompositionUpdates(bool immediate_request, |
| 2651 bool monitor_updates) { | 2645 bool monitor_updates) { |
| 2652 if (!immediate_request && monitor_updates == monitoring_composition_info_) | 2646 if (!immediate_request && monitor_updates == monitoring_composition_info_) |
| 2653 return; | 2647 return; |
| 2654 monitoring_composition_info_ = monitor_updates; | 2648 monitoring_composition_info_ = monitor_updates; |
| 2655 Send(new InputMsg_RequestCompositionUpdates(routing_id_, immediate_request, | 2649 Send(new InputMsg_RequestCompositionUpdates(routing_id_, immediate_request, |
| 2656 monitor_updates)); | 2650 monitor_updates)); |
| 2657 } | 2651 } |
| 2658 | 2652 |
| 2659 } // namespace content | 2653 } // namespace content |
| OLD | NEW |