| 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 const gfx::Point& root_offset) { |
| 341 if (host_) |
| 342 host_->Send(new ViewMsg_SetViewportIntersection( |
| 343 host_->GetRoutingID(), viewport_intersection, root_offset)); |
| 344 } |
| 345 |
| 338 void RenderWidgetHostViewChildFrame::GestureEventAck( | 346 void RenderWidgetHostViewChildFrame::GestureEventAck( |
| 339 const blink::WebGestureEvent& event, | 347 const blink::WebGestureEvent& event, |
| 340 InputEventAckState ack_result) { | 348 InputEventAckState ack_result) { |
| 341 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || | 349 bool not_consumed = ack_result == INPUT_EVENT_ACK_STATE_NOT_CONSUMED || |
| 342 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; | 350 ack_result == INPUT_EVENT_ACK_STATE_NO_CONSUMER_EXISTS; |
| 343 // GestureScrollBegin is consumed by the target frame and not forwarded, | 351 // 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 | 352 // because we don't know whether we will need to bubble scroll until we |
| 345 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused | 353 // receive a GestureScrollUpdate ACK. GestureScrollUpdate with unused |
| 346 // scroll extent is forwarded for bubbling, while GestureScrollEnd is | 354 // scroll extent is forwarded for bubbling, while GestureScrollEnd is |
| 347 // always forwarded and handled according to current scroll state in the | 355 // 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 | 746 |
| 739 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 747 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 740 return true; | 748 return true; |
| 741 } | 749 } |
| 742 | 750 |
| 743 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 751 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 744 return cc::SurfaceId(frame_sink_id_, local_frame_id_); | 752 return cc::SurfaceId(frame_sink_id_, local_frame_id_); |
| 745 }; | 753 }; |
| 746 | 754 |
| 747 } // namespace content | 755 } // namespace content |
| OLD | NEW |