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