Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 1414663011: Notifying the Out of Process Renderer about Visibility Change of a Remote Frame (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added Tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698