OLD | NEW |
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 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
328 } | 328 } |
329 | 329 |
330 void RenderWidgetHostViewChildFrame::UnregisterFrameSinkId() { | 330 void RenderWidgetHostViewChildFrame::UnregisterFrameSinkId() { |
331 DCHECK(host_); | 331 DCHECK(host_); |
332 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { | 332 if (host_->delegate() && host_->delegate()->GetInputEventRouter()) { |
333 host_->delegate()->GetInputEventRouter()->RemoveFrameSinkIdOwner( | 333 host_->delegate()->GetInputEventRouter()->RemoveFrameSinkIdOwner( |
334 frame_sink_id_); | 334 frame_sink_id_); |
335 } | 335 } |
336 } | 336 } |
337 | 337 |
| 338 void RenderWidgetHostViewChildFrame::UpdateViewportIntersection( |
| 339 const gfx::Rect& viewport_intersection) { |
| 340 if (host_) |
| 341 host_->Send(new ViewMsg_SetViewportIntersection(host_->GetRoutingID(), |
| 342 viewport_intersection)); |
| 343 } |
| 344 |
338 void RenderWidgetHostViewChildFrame::GestureEventAck( | 345 void RenderWidgetHostViewChildFrame::GestureEventAck( |
339 const blink::WebGestureEvent& event, | 346 const blink::WebGestureEvent& event, |
340 InputEventAckState ack_result) { | 347 InputEventAckState ack_result) { |
341 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || | 348 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || |
342 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 349 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
343 // GestureScrollBegin is consumed by the target frame and not forwarded, | 350 // GestureScrollBegin is consumed by the target frame and not forwarded, |
344 // because we don't know whether we will need to bubble scroll until we | 351 // because we don't know whether we will need to bubble scroll until we |
345 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused | 352 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused |
346 // scroll extent is forwarded for bubbling, while GestureScrollEnd is | 353 // scroll extent is forwarded for bubbling, while GestureScrollEnd is |
347 // always forwarded and handled according to current scroll state in the | 354 // always forwarded and handled according to current scroll state in the |
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
738 | 745 |
739 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 746 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
740 return true; | 747 return true; |
741 } | 748 } |
742 | 749 |
743 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 750 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
744 return cc::SurfaceId(frame_sink_id_, local_frame_id_); | 751 return cc::SurfaceId(frame_sink_id_, local_frame_id_); |
745 }; | 752 }; |
746 | 753 |
747 } // namespace content | 754 } // namespace content |
OLD | NEW |