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

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2883033003: Propagate inert state to OOPIFs when a modal dialog is active (Closed)
Patch Set: alexmos comments addressed Created 3 years, 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 } 376 }
377 } 377 }
378 378
379 void RenderWidgetHostViewChildFrame::UpdateViewportIntersection( 379 void RenderWidgetHostViewChildFrame::UpdateViewportIntersection(
380 const gfx::Rect& viewport_intersection) { 380 const gfx::Rect& viewport_intersection) {
381 if (host_) 381 if (host_)
382 host_->Send(new ViewMsg_SetViewportIntersection(host_->GetRoutingID(), 382 host_->Send(new ViewMsg_SetViewportIntersection(host_->GetRoutingID(),
383 viewport_intersection)); 383 viewport_intersection));
384 } 384 }
385 385
386 void RenderWidgetHostViewChildFrame::SetIsInert() {
387 if (host_ && frame_connector_) {
388 host_->Send(new ViewMsg_SetIsInert(host_->GetRoutingID(),
389 frame_connector_->is_inert()));
390 }
391 }
392
386 void RenderWidgetHostViewChildFrame::GestureEventAck( 393 void RenderWidgetHostViewChildFrame::GestureEventAck(
387 const blink::WebGestureEvent& event, 394 const blink::WebGestureEvent& event,
388 InputEventAckState ack_result) { 395 InputEventAckState ack_result) {
389 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || 396 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED ||
390 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; 397 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS;
391 // GestureScrollBegin is consumed by the target frame and not forwarded, 398 // GestureScrollBegin is consumed by the target frame and not forwarded,
392 // because we don't know whether we will need to bubble scroll until we 399 // because we don't know whether we will need to bubble scroll until we
393 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused 400 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused
394 // scroll extent is forwarded for bubbling, while GestureScrollEnd is 401 // scroll extent is forwarded for bubbling, while GestureScrollEnd is
395 // always forwarded and handled according to current scroll state in the 402 // always forwarded and handled according to current scroll state in the
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 return frame_connector_->TransformPointToCoordSpaceForView( 620 return frame_connector_->TransformPointToCoordSpaceForView(
614 point, target_view, cc::SurfaceId(frame_sink_id_, local_surface_id_), 621 point, target_view, cc::SurfaceId(frame_sink_id_, local_surface_id_),
615 transformed_point); 622 transformed_point);
616 } 623 }
617 624
618 bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() { 625 bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() {
619 return true; 626 return true;
620 } 627 }
621 628
622 void RenderWidgetHostViewChildFrame::WillSendScreenRects() { 629 void RenderWidgetHostViewChildFrame::WillSendScreenRects() {
623 if (frame_connector_) 630 if (frame_connector_) {
624 UpdateViewportIntersection(frame_connector_->viewport_intersection()); 631 UpdateViewportIntersection(frame_connector_->viewport_intersection());
632 SetIsInert();
alexmos 2017/06/20 18:46:10 Assuming that this handles the new process case, i
kenrb 2017/06/22 15:33:35 I agree this doesn't feel like the greatest place,
alexmos 2017/06/22 17:09:27 OK. Perhaps add a TODO and describe some of those
633 }
625 } 634 }
626 635
627 #if defined(OS_MACOSX) 636 #if defined(OS_MACOSX)
628 ui::AcceleratedWidgetMac* 637 ui::AcceleratedWidgetMac*
629 RenderWidgetHostViewChildFrame::GetAcceleratedWidgetMac() const { 638 RenderWidgetHostViewChildFrame::GetAcceleratedWidgetMac() const {
630 return nullptr; 639 return nullptr;
631 } 640 }
632 641
633 void RenderWidgetHostViewChildFrame::SetActive(bool active) { 642 void RenderWidgetHostViewChildFrame::SetActive(bool active) {
634 } 643 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 auto origin = GetViewBounds().origin() - 853 auto origin = GetViewBounds().origin() -
845 frame_connector_->GetRootRenderWidgetHostView() 854 frame_connector_->GetRootRenderWidgetHostView()
846 ->GetViewBounds() 855 ->GetViewBounds()
847 .origin(); 856 .origin();
848 return gfx::Point(origin.x(), origin.y()); 857 return gfx::Point(origin.x(), origin.y());
849 } 858 }
850 return gfx::Point(); 859 return gfx::Point();
851 } 860 }
852 861
853 } // namespace content 862 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698