| 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/renderer/render_widget.h" | 5 #include "content/renderer/render_widget.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 OnEnableDeviceEmulation) | 513 OnEnableDeviceEmulation) |
| 514 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, | 514 IPC_MESSAGE_HANDLER(ViewMsg_DisableDeviceEmulation, |
| 515 OnDisableDeviceEmulation) | 515 OnDisableDeviceEmulation) |
| 516 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect) | 516 IPC_MESSAGE_HANDLER(ViewMsg_ChangeResizeRect, OnChangeResizeRect) |
| 517 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) | 517 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) |
| 518 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) | 518 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) |
| 519 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) | 519 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) |
| 520 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) | 520 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) |
| 521 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) | 521 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) |
| 522 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) | 522 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) |
| 523 IPC_MESSAGE_HANDLER(ViewMsg_SetSurfaceClientId, OnSetSurfaceClientId) | 523 IPC_MESSAGE_HANDLER(ViewMsg_SetFrameSinkId, OnSetFrameSinkId) |
| 524 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, | 524 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, |
| 525 OnWaitNextFrameForTests) | 525 OnWaitNextFrameForTests) |
| 526 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, | 526 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, |
| 527 OnRequestCompositionUpdate) | 527 OnRequestCompositionUpdate) |
| 528 #if defined(OS_ANDROID) | 528 #if defined(OS_ANDROID) |
| 529 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck) | 529 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck) |
| 530 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, | 530 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, |
| 531 OnRequestTextInputStateUpdate) | 531 OnRequestTextInputStateUpdate) |
| 532 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit, | 532 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit, |
| 533 OnImeBatchEdit) | 533 OnImeBatchEdit) |
| (...skipping 986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1520 | 1520 |
| 1521 void RenderWidget::OnUpdateWindowScreenRect( | 1521 void RenderWidget::OnUpdateWindowScreenRect( |
| 1522 const gfx::Rect& window_screen_rect) { | 1522 const gfx::Rect& window_screen_rect) { |
| 1523 if (screen_metrics_emulator_) { | 1523 if (screen_metrics_emulator_) { |
| 1524 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); | 1524 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); |
| 1525 } else { | 1525 } else { |
| 1526 window_screen_rect_ = window_screen_rect; | 1526 window_screen_rect_ = window_screen_rect; |
| 1527 } | 1527 } |
| 1528 } | 1528 } |
| 1529 | 1529 |
| 1530 void RenderWidget::OnSetSurfaceClientId(uint32_t surface_id_namespace) { | 1530 void RenderWidget::OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id) { |
| 1531 if (compositor_) | 1531 if (compositor_) |
| 1532 compositor_->SetSurfaceClientId(surface_id_namespace); | 1532 compositor_->SetFrameSinkId(frame_sink_id); |
| 1533 } | 1533 } |
| 1534 | 1534 |
| 1535 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { | 1535 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { |
| 1536 if (compositor_) | 1536 if (compositor_) |
| 1537 compositor_->OnHandleCompositorProto(proto); | 1537 compositor_->OnHandleCompositorProto(proto); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 void RenderWidget::showImeIfNeeded() { | 1540 void RenderWidget::showImeIfNeeded() { |
| 1541 OnShowImeIfNeeded(); | 1541 OnShowImeIfNeeded(); |
| 1542 } | 1542 } |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2166 bool RenderWidget::isPointerLocked() { | 2166 bool RenderWidget::isPointerLocked() { |
| 2167 return mouse_lock_dispatcher_->IsMouseLockedTo( | 2167 return mouse_lock_dispatcher_->IsMouseLockedTo( |
| 2168 webwidget_mouse_lock_target_.get()); | 2168 webwidget_mouse_lock_target_.get()); |
| 2169 } | 2169 } |
| 2170 | 2170 |
| 2171 blink::WebWidget* RenderWidget::GetWebWidget() const { | 2171 blink::WebWidget* RenderWidget::GetWebWidget() const { |
| 2172 return webwidget_internal_; | 2172 return webwidget_internal_; |
| 2173 } | 2173 } |
| 2174 | 2174 |
| 2175 } // namespace content | 2175 } // namespace content |
| OLD | NEW |