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