| 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 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData) | 551 IPC_MESSAGE_HANDLER(FrameHostMsg_HittestData, OnHittestData) |
| 552 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, | 552 IPC_MESSAGE_HANDLER(InputHostMsg_QueueSyntheticGesture, |
| 553 OnQueueSyntheticGesture) | 553 OnQueueSyntheticGesture) |
| 554 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, | 554 IPC_MESSAGE_HANDLER(InputHostMsg_ImeCancelComposition, |
| 555 OnImeCancelComposition) | 555 OnImeCancelComposition) |
| 556 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) | 556 IPC_MESSAGE_HANDLER(ViewHostMsg_Close, OnClose) |
| 557 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, | 557 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateScreenRects_ACK, |
| 558 OnUpdateScreenRectsAck) | 558 OnUpdateScreenRectsAck) |
| 559 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) | 559 IPC_MESSAGE_HANDLER(ViewHostMsg_RequestMove, OnRequestMove) |
| 560 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) | 560 IPC_MESSAGE_HANDLER(ViewHostMsg_SetTooltipText, OnSetTooltipText) |
| 561 IPC_MESSAGE_HANDLER(ViewHostMsg_BeginFrameDidNotSwap, BeginFrameDidNotSwap) | 561 IPC_MESSAGE_HANDLER(ViewHostMsg_DidNotProduceFrame, DidNotProduceFrame) |
| 562 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) | 562 IPC_MESSAGE_HANDLER(ViewHostMsg_UpdateRect, OnUpdateRect) |
| 563 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) | 563 IPC_MESSAGE_HANDLER(ViewHostMsg_SetCursor, OnSetCursor) |
| 564 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, | 564 IPC_MESSAGE_HANDLER(ViewHostMsg_TextInputStateChanged, |
| 565 OnTextInputStateChanged) | 565 OnTextInputStateChanged) |
| 566 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) | 566 IPC_MESSAGE_HANDLER(ViewHostMsg_LockMouse, OnLockMouse) |
| 567 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) | 567 IPC_MESSAGE_HANDLER(ViewHostMsg_UnlockMouse, OnUnlockMouse) |
| 568 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, | 568 IPC_MESSAGE_HANDLER(ViewHostMsg_ShowDisambiguationPopup, |
| 569 OnShowDisambiguationPopup) | 569 OnShowDisambiguationPopup) |
| 570 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, | 570 IPC_MESSAGE_HANDLER(ViewHostMsg_SelectionBoundsChanged, |
| 571 OnSelectionBoundsChanged) | 571 OnSelectionBoundsChanged) |
| (...skipping 1350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 SendScreenRects(); | 1922 SendScreenRects(); |
| 1923 } | 1923 } |
| 1924 | 1924 |
| 1925 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { | 1925 void RenderWidgetHostImpl::OnRequestMove(const gfx::Rect& pos) { |
| 1926 if (view_) { | 1926 if (view_) { |
| 1927 view_->SetBounds(pos); | 1927 view_->SetBounds(pos); |
| 1928 Send(new ViewMsg_Move_ACK(routing_id_)); | 1928 Send(new ViewMsg_Move_ACK(routing_id_)); |
| 1929 } | 1929 } |
| 1930 } | 1930 } |
| 1931 | 1931 |
| 1932 void RenderWidgetHostImpl::BeginFrameDidNotSwap(const cc::BeginFrameAck& ack) { | 1932 void RenderWidgetHostImpl::DidNotProduceFrame(const cc::BeginFrameAck& ack) { |
| 1933 // |has_damage| is not transmitted. | 1933 // |has_damage| is not transmitted. |
| 1934 cc::BeginFrameAck modified_ack = ack; | 1934 cc::BeginFrameAck modified_ack = ack; |
| 1935 modified_ack.has_damage = false; | 1935 modified_ack.has_damage = false; |
| 1936 | 1936 |
| 1937 if (view_) | 1937 if (view_) |
| 1938 view_->OnBeginFrameDidNotSwap(modified_ack); | 1938 view_->OnDidNotProduceFrame(modified_ack); |
| 1939 } | 1939 } |
| 1940 | 1940 |
| 1941 void RenderWidgetHostImpl::OnUpdateRect( | 1941 void RenderWidgetHostImpl::OnUpdateRect( |
| 1942 const ViewHostMsg_UpdateRect_Params& params) { | 1942 const ViewHostMsg_UpdateRect_Params& params) { |
| 1943 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); | 1943 TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::OnUpdateRect"); |
| 1944 TimeTicks paint_start = TimeTicks::Now(); | 1944 TimeTicks paint_start = TimeTicks::Now(); |
| 1945 | 1945 |
| 1946 // Update our knowledge of the RenderWidget's size. | 1946 // Update our knowledge of the RenderWidget's size. |
| 1947 current_size_ = params.view_size; | 1947 current_size_ = params.view_size; |
| 1948 | 1948 |
| (...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2657 device::mojom::WakeLockType::PreventDisplaySleep, | 2657 device::mojom::WakeLockType::PreventDisplaySleep, |
| 2658 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", | 2658 device::mojom::WakeLockReason::ReasonOther, "GetSnapshot", |
| 2659 std::move(request)); | 2659 std::move(request)); |
| 2660 } | 2660 } |
| 2661 } | 2661 } |
| 2662 return wake_lock_.get(); | 2662 return wake_lock_.get(); |
| 2663 } | 2663 } |
| 2664 #endif | 2664 #endif |
| 2665 | 2665 |
| 2666 } // namespace content | 2666 } // namespace content |
| OLD | NEW |