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 10 matching lines...) Expand all Loading... |
21 #include "base/memory/ptr_util.h" | 21 #include "base/memory/ptr_util.h" |
22 #include "base/metrics/field_trial.h" | 22 #include "base/metrics/field_trial.h" |
23 #include "base/metrics/histogram_macros.h" | 23 #include "base/metrics/histogram_macros.h" |
24 #include "base/single_thread_task_runner.h" | 24 #include "base/single_thread_task_runner.h" |
25 #include "base/strings/string_number_conversions.h" | 25 #include "base/strings/string_number_conversions.h" |
26 #include "base/strings/utf_string_conversions.h" | 26 #include "base/strings/utf_string_conversions.h" |
27 #include "base/threading/thread_task_runner_handle.h" | 27 #include "base/threading/thread_task_runner_handle.h" |
28 #include "base/trace_event/trace_event.h" | 28 #include "base/trace_event/trace_event.h" |
29 #include "build/build_config.h" | 29 #include "build/build_config.h" |
30 #include "cc/base/switches.h" | 30 #include "cc/base/switches.h" |
| 31 #include "cc/output/begin_frame_args.h" |
31 #include "cc/output/compositor_frame.h" | 32 #include "cc/output/compositor_frame.h" |
32 #include "content/browser/accessibility/accessibility_mode_helper.h" | 33 #include "content/browser/accessibility/accessibility_mode_helper.h" |
33 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 34 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
34 #include "content/browser/bad_message.h" | 35 #include "content/browser/bad_message.h" |
35 #include "content/browser/browser_plugin/browser_plugin_guest.h" | 36 #include "content/browser/browser_plugin/browser_plugin_guest.h" |
36 #include "content/browser/child_process_security_policy_impl.h" | 37 #include "content/browser/child_process_security_policy_impl.h" |
37 #include "content/browser/gpu/compositor_util.h" | 38 #include "content/browser/gpu/compositor_util.h" |
38 #include "content/browser/renderer_host/dip_util.h" | 39 #include "content/browser/renderer_host/dip_util.h" |
39 #include "content/browser/renderer_host/frame_metadata_util.h" | 40 #include "content/browser/renderer_host/frame_metadata_util.h" |
40 #include "content/browser/renderer_host/input/input_router_config_helper.h" | 41 #include "content/browser/renderer_host/input/input_router_config_helper.h" |
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 OnQueueSyntheticGesture) | 522 OnQueueSyntheticGesture) |
522 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, | 523 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, |
523 OnImeCancelComposition) | 524 OnImeCancelComposition) |
524 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 525 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
525 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, | 526 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, |
526 OnUpdateScreenRectsAck) | 527 OnUpdateScreenRectsAck) |
527 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 528 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
528 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 529 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
529 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, | 530 IPC_MESSAGE_HANDLER_GENERIC(ViewHostMsg_SwapCompositorFrame, |
530 OnSwapCompositorFrame(msg)) | 531 OnSwapCompositorFrame(msg)) |
| 532 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginFrameDidNotDraw, |
| 533 OnBeginFrameDidNotDraw) |
531 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 534 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
532 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) | 535 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) |
533 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 536 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
534 OnTextInputStateChanged) | 537 OnTextInputStateChanged) |
535 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) | 538 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) |
536 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) | 539 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
537 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, | 540 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, |
538 OnShowDisambiguationPopup) | 541 OnShowDisambiguationPopup) |
539 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 542 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
540 OnSelectionBoundsChanged) | 543 OnSelectionBoundsChanged) |
(...skipping 1304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1845 ++i) { | 1848 ++i) { |
1846 rph->OnMessageReceived(*i); | 1849 rph->OnMessageReceived(*i); |
1847 if (i->dispatch_error()) | 1850 if (i->dispatch_error()) |
1848 rph->OnBadMessageReceived(*i); | 1851 rph->OnBadMessageReceived(*i); |
1849 } | 1852 } |
1850 messages_to_deliver_with_frame.clear(); | 1853 messages_to_deliver_with_frame.clear(); |
1851 | 1854 |
1852 return true; | 1855 return true; |
1853 } | 1856 } |
1854 | 1857 |
| 1858 void RenderWidgetHostImpl::OnBeginFrameDidNotDraw( |
| 1859 const cc::BeginFrameAck& ack) { |
| 1860 if (view_) |
| 1861 view_->OnBeginFrameDidNotDraw(ack); |
| 1862 } |
| 1863 |
1855 void RenderWidgetHostImpl::OnUpdateRect( | 1864 void RenderWidgetHostImpl::OnUpdateRect( |
1856 const ViewHostMsg_UpdateRect_Params& params) { | 1865 const ViewHostMsg_UpdateRect_Params& params) { |
1857 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); | 1866 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); |
1858 TimeTicks paint_start = TimeTicks::Now(); | 1867 TimeTicks paint_start = TimeTicks::Now(); |
1859 | 1868 |
1860 // Update our knowledge of the RenderWidget's size. | 1869 // Update our knowledge of the RenderWidget's size. |
1861 current_size_ = params.view_size; | 1870 current_size_ = params.view_size; |
1862 | 1871 |
1863 bool is_resize_ack = | 1872 bool is_resize_ack = |
1864 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags); | 1873 ViewHostMsg_UpdateRect_Flags::is_resize_ack(params.flags); |
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2503 // Note: We are using the origin URL provided by the sender here. It may be | 2512 // Note: We are using the origin URL provided by the sender here. It may be |
2504 // different from the receiver's. | 2513 // different from the receiver's. |
2505 file_system_file.url = | 2514 file_system_file.url = |
2506 GURL(storage::GetIsolatedFileSystemRootURIString( | 2515 GURL(storage::GetIsolatedFileSystemRootURIString( |
2507 file_system_url.origin(), filesystem_id, std::string()) | 2516 file_system_url.origin(), filesystem_id, std::string()) |
2508 .append(register_name)); | 2517 .append(register_name)); |
2509 } | 2518 } |
2510 } | 2519 } |
2511 | 2520 |
2512 } // namespace content | 2521 } // namespace content |
OLD | NEW |