| 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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 } | 299 } |
| 300 | 300 |
| 301 void RenderWidgetHostViewChildFrame::LockCompositingSurface() { | 301 void RenderWidgetHostViewChildFrame::LockCompositingSurface() { |
| 302 NOTIMPLEMENTED(); | 302 NOTIMPLEMENTED(); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() { | 305 void RenderWidgetHostViewChildFrame::UnlockCompositingSurface() { |
| 306 NOTIMPLEMENTED(); | 306 NOTIMPLEMENTED(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 RenderWidgetHostViewBase* RenderWidgetHostViewChildFrame::GetParentView() { |
| 310 if (!frame_connector_) |
| 311 return nullptr; |
| 312 return frame_connector_->GetParentRenderWidgetHostView(); |
| 313 } |
| 314 |
| 309 void RenderWidgetHostViewChildFrame::RegisterSurfaceNamespaceId() { | 315 void RenderWidgetHostViewChildFrame::RegisterSurfaceNamespaceId() { |
| 310 // If Destroy() has been called before we get here, host_ may be null. | 316 // If Destroy() has been called before we get here, host_ may be null. |
| 311 if (host_ && host_->delegate() && host_->delegate()->GetInputEventRouter()) { | 317 if (host_ && host_->delegate() && host_->delegate()->GetInputEventRouter()) { |
| 312 RenderWidgetHostInputEventRouter* router = | 318 RenderWidgetHostInputEventRouter* router = |
| 313 host_->delegate()->GetInputEventRouter(); | 319 host_->delegate()->GetInputEventRouter(); |
| 314 if (!router->is_registered(GetSurfaceClientId())) | 320 if (!router->is_registered(GetSurfaceClientId())) |
| 315 router->AddSurfaceClientIdOwner(GetSurfaceClientId(), this); | 321 router->AddSurfaceClientIdOwner(GetSurfaceClientId(), this); |
| 316 } | 322 } |
| 317 } | 323 } |
| 318 | 324 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 521 } |
| 516 | 522 |
| 517 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( | 523 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToRootCoordSpace( |
| 518 const gfx::Point& point) { | 524 const gfx::Point& point) { |
| 519 if (!frame_connector_) | 525 if (!frame_connector_) |
| 520 return point; | 526 return point; |
| 521 | 527 |
| 522 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); | 528 return frame_connector_->TransformPointToRootCoordSpace(point, surface_id_); |
| 523 } | 529 } |
| 524 | 530 |
| 531 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToLocalCoordSpace( |
| 532 const gfx::Point& point, |
| 533 const cc::SurfaceId& original_surface) { |
| 534 if (!frame_connector_ || surface_id_.is_null()) |
| 535 return point; |
| 536 |
| 537 return frame_connector_->TransformPointToLocalCoordSpace( |
| 538 point, original_surface, surface_id_); |
| 539 } |
| 540 |
| 541 gfx::Point RenderWidgetHostViewChildFrame::TransformPointToCoordSpaceForView( |
| 542 const gfx::Point& point, |
| 543 RenderWidgetHostViewBase* target_view) { |
| 544 if (!frame_connector_ || surface_id_.is_null() || target_view == this) |
| 545 return point; |
| 546 |
| 547 return frame_connector_->TransformPointToCoordSpaceForView(point, target_view, |
| 548 surface_id_); |
| 549 } |
| 550 |
| 525 #if defined(OS_MACOSX) | 551 #if defined(OS_MACOSX) |
| 526 ui::AcceleratedWidgetMac* | 552 ui::AcceleratedWidgetMac* |
| 527 RenderWidgetHostViewChildFrame::GetAcceleratedWidgetMac() const { | 553 RenderWidgetHostViewChildFrame::GetAcceleratedWidgetMac() const { |
| 528 return nullptr; | 554 return nullptr; |
| 529 } | 555 } |
| 530 | 556 |
| 531 void RenderWidgetHostViewChildFrame::SetActive(bool active) { | 557 void RenderWidgetHostViewChildFrame::SetActive(bool active) { |
| 532 } | 558 } |
| 533 | 559 |
| 534 void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { | 560 void RenderWidgetHostViewChildFrame::ShowDefinitionForSelection() { |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 | 703 |
| 678 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 704 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
| 679 return true; | 705 return true; |
| 680 } | 706 } |
| 681 | 707 |
| 682 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 708 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 683 return surface_id_; | 709 return surface_id_; |
| 684 }; | 710 }; |
| 685 | 711 |
| 686 } // namespace content | 712 } // namespace content |
| OLD | NEW |