| 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 } | 512 } |
| 513 | 513 |
| 514 void RenderWidgetHostViewChildFrame::ProcessGestureEvent( | 514 void RenderWidgetHostViewChildFrame::ProcessGestureEvent( |
| 515 const blink::WebGestureEvent& event, | 515 const blink::WebGestureEvent& event, |
| 516 const ui::LatencyInfo& latency) { | 516 const ui::LatencyInfo& latency) { |
| 517 host_->ForwardGestureEventWithLatencyInfo(event, latency); | 517 host_->ForwardGestureEventWithLatencyInfo(event, latency); |
| 518 } | 518 } |
| 519 | 519 |
| 520 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( | 520 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( |
| 521 const gfx::Point& point) { | 521 const gfx::Point& point) { |
| 522 if (!frame_connector_) | 522 if (!frame_connector_ || !local_frame_id_.is_valid()) |
| 523 return point; | 523 return point; |
| 524 | 524 |
| 525 return frame_connector_->TransformPointToRootCoordSpace( | 525 return frame_connector_->TransformPointToRootCoordSpace( |
| 526 point, cc::SurfaceId(frame_sink_id_, local_frame_id_)); | 526 point, cc::SurfaceId(frame_sink_id_, local_frame_id_)); |
| 527 } | 527 } |
| 528 | 528 |
| 529 bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace( | 529 bool RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace( |
| 530 const gfx::Point& point, | 530 const gfx::Point& point, |
| 531 const cc::SurfaceId& original_surface, | 531 const cc::SurfaceId& original_surface, |
| 532 gfx::Point* transformed_point) { | 532 gfx::Point* transformed_point) { |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 732 | 732 |
| 733 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 733 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 734 return true; | 734 return true; |
| 735 } | 735 } |
| 736 | 736 |
| 737 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 737 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 738 return cc::SurfaceId(frame_sink_id_, local_frame_id_); | 738 return cc::SurfaceId(frame_sink_id_, local_frame_id_); |
| 739 }; | 739 }; |
| 740 | 740 |
| 741 } // namespace content | 741 } // namespace content |
| OLD | NEW |