| 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 "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
| 8 #include "cc/surfaces/surface_factory.h" | 8 #include "cc/surfaces/surface_factory.h" |
| 9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
| 10 #include "cc/surfaces/surface_sequence.h" | 10 #include "cc/surfaces/surface_sequence.h" |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 return BrowserAccessibilityManager::Create( | 475 return BrowserAccessibilityManager::Create( |
| 476 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 476 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
| 477 } | 477 } |
| 478 | 478 |
| 479 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { | 479 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { |
| 480 if (surface_factory_ && !surface_id_.is_null()) | 480 if (surface_factory_ && !surface_id_.is_null()) |
| 481 surface_factory_->Destroy(surface_id_); | 481 surface_factory_->Destroy(surface_id_); |
| 482 surface_id_ = cc::SurfaceId(); | 482 surface_id_ = cc::SurfaceId(); |
| 483 } | 483 } |
| 484 | 484 |
| 485 // This method is called only when the renderer changes the visibility of the |
| 486 // corresponding frame. |
| 487 void RenderWidgetHostViewChildFrame::SetVisibility(bool visible) { |
| 488 if (host_->delegate()->DidForwardVisibilityChangeToGuest(visible)) |
| 489 return; |
| 490 if (visible) |
| 491 Show(); |
| 492 else |
| 493 Hide(); |
| 494 } |
| 495 |
| 485 } // namespace content | 496 } // namespace content |
| OLD | NEW |