| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 | 537 |
| 538 return frame_connector_->TransformPointToLocalCoordSpace( | 538 return frame_connector_->TransformPointToLocalCoordSpace( |
| 539 point, original_surface, cc::SurfaceId(frame_sink_id_, local_frame_id_), | 539 point, original_surface, cc::SurfaceId(frame_sink_id_, local_frame_id_), |
| 540 transformed_point); | 540 transformed_point); |
| 541 } | 541 } |
| 542 | 542 |
| 543 bool RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView( | 543 bool RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView( |
| 544 const gfx::Point& point, | 544 const gfx::Point& point, |
| 545 RenderWidgetHostViewBase* target_view, | 545 RenderWidgetHostViewBase* target_view, |
| 546 gfx::Point* transformed_point) { | 546 gfx::Point* transformed_point) { |
| 547 if (!frame_connector_ || !local_frame_id_.is_valid() || target_view == this) | 547 if (!frame_connector_ || !local_frame_id_.is_valid()) |
| 548 return false; | 548 return false; |
| 549 | 549 |
| 550 if (target_view == this) { |
| 551 *transformed_point = point; |
| 552 return true; |
| 553 } |
| 554 |
| 550 return frame_connector_->TransformPointToCoordSpaceForView( | 555 return frame_connector_->TransformPointToCoordSpaceForView( |
| 551 point, target_view, cc::SurfaceId(frame_sink_id_, local_frame_id_), | 556 point, target_view, cc::SurfaceId(frame_sink_id_, local_frame_id_), |
| 552 transformed_point); | 557 transformed_point); |
| 553 } | 558 } |
| 554 | 559 |
| 555 bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() { | 560 bool RenderWidgetHostViewChildFrame::IsRenderWidgetHostViewChildFrame() { |
| 556 return true; | 561 return true; |
| 557 } | 562 } |
| 558 | 563 |
| 559 #if defined(OS_MACOSX) | 564 #if defined(OS_MACOSX) |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 734 | 739 |
| 735 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 740 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 736 return true; | 741 return true; |
| 737 } | 742 } |
| 738 | 743 |
| 739 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 744 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 740 return cc::SurfaceId(frame_sink_id_, local_frame_id_); | 745 return cc::SurfaceId(frame_sink_id_, local_frame_id_); |
| 741 }; | 746 }; |
| 742 | 747 |
| 743 } // namespace content | 748 } // namespace content |
| OLD | NEW |