Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(731)

Side by Side Diff: content/renderer/render_widget.cc

Issue 2431473003: Intersection Observer support for OOPIF (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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_WasHidden, OnWasHidden) 516 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden)
517 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown) 517 IPC_MESSAGE_HANDLER(ViewMsg_WasShown, OnWasShown)
518 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint) 518 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnRepaint)
519 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection) 519 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
520 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck) 520 IPC_MESSAGE_HANDLER(ViewMsg_Move_ACK, OnRequestMoveAck)
521 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects) 521 IPC_MESSAGE_HANDLER(ViewMsg_UpdateScreenRects, OnUpdateScreenRects)
522 IPC_MESSAGE_HANDLER(ViewMsg_SetFrameSinkId, OnSetFrameSinkId) 522 IPC_MESSAGE_HANDLER(ViewMsg_SetFrameSinkId, OnSetFrameSinkId)
523 IPC_MESSAGE_HANDLER(ViewMsg_SetViewportIntersection,
524 OnSetViewportIntersection)
523 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests, 525 IPC_MESSAGE_HANDLER(ViewMsg_WaitForNextFrameForTests,
524 OnWaitNextFrameForTests) 526 OnWaitNextFrameForTests)
525 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate, 527 IPC_MESSAGE_HANDLER(InputMsg_RequestCompositionUpdate,
526 OnRequestCompositionUpdate) 528 OnRequestCompositionUpdate)
527 #if defined(OS_ANDROID) 529 #if defined(OS_ANDROID)
528 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck) 530 IPC_MESSAGE_HANDLER(InputMsg_ImeEventAck, OnImeEventAck)
529 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate, 531 IPC_MESSAGE_HANDLER(InputMsg_RequestTextInputStateUpdate,
530 OnRequestTextInputStateUpdate) 532 OnRequestTextInputStateUpdate)
531 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit, 533 IPC_MESSAGE_HANDLER(InputMsg_ImeBatchEdit,
532 OnImeBatchEdit) 534 OnImeBatchEdit)
(...skipping 1004 matching lines...) Expand 10 before | Expand all | Expand 10 after
1537 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect); 1539 screen_metrics_emulator_->OnUpdateWindowScreenRect(window_screen_rect);
1538 else 1540 else
1539 window_screen_rect_ = window_screen_rect; 1541 window_screen_rect_ = window_screen_rect;
1540 } 1542 }
1541 1543
1542 void RenderWidget::OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id) { 1544 void RenderWidget::OnSetFrameSinkId(const cc::FrameSinkId& frame_sink_id) {
1543 if (compositor_) 1545 if (compositor_)
1544 compositor_->SetFrameSinkId(frame_sink_id); 1546 compositor_->SetFrameSinkId(frame_sink_id);
1545 } 1547 }
1546 1548
1549 void RenderWidget::OnSetViewportIntersection(
1550 const gfx::Rect& viewport_intersection,
1551 const gfx::Point& root_offset) {
1552 if (GetWebWidget())
1553 GetWebWidget()->setRemoteViewportIntersection(viewport_intersection,
1554 root_offset);
1555 }
1556
1547 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) { 1557 void RenderWidget::OnHandleCompositorProto(const std::vector<uint8_t>& proto) {
1548 if (compositor_) 1558 if (compositor_)
1549 compositor_->OnHandleCompositorProto(proto); 1559 compositor_->OnHandleCompositorProto(proto);
1550 } 1560 }
1551 1561
1552 void RenderWidget::showImeIfNeeded() { 1562 void RenderWidget::showImeIfNeeded() {
1553 OnShowImeIfNeeded(); 1563 OnShowImeIfNeeded();
1554 } 1564 }
1555 1565
1556 ui::TextInputType RenderWidget::GetTextInputType() { 1566 ui::TextInputType RenderWidget::GetTextInputType() {
(...skipping 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2178 bool RenderWidget::isPointerLocked() { 2188 bool RenderWidget::isPointerLocked() {
2179 return mouse_lock_dispatcher_->IsMouseLockedTo( 2189 return mouse_lock_dispatcher_->IsMouseLockedTo(
2180 webwidget_mouse_lock_target_.get()); 2190 webwidget_mouse_lock_target_.get());
2181 } 2191 }
2182 2192
2183 blink::WebWidget* RenderWidget::GetWebWidget() const { 2193 blink::WebWidget* RenderWidget::GetWebWidget() const {
2184 return webwidget_internal_; 2194 return webwidget_internal_;
2185 } 2195 }
2186 2196
2187 } // namespace content 2197 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698