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

Side by Side Diff: components/guest_view/browser/guest_view_base.cc

Issue 1592573002: Fixing WebViewVisibilityTests for OOPIF-<webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merged Created 4 years, 10 months 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 "components/guest_view/browser/guest_view_base.h" 5 #include "components/guest_view/browser/guest_view_base.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/lazy_instance.h" 9 #include "base/lazy_instance.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
593 593
594 // Self-destruct. 594 // Self-destruct.
595 delete this; 595 delete this;
596 } 596 }
597 597
598 void GuestViewBase::DidNavigateMainFrame( 598 void GuestViewBase::DidNavigateMainFrame(
599 const content::LoadCommittedDetails& details, 599 const content::LoadCommittedDetails& details,
600 const content::FrameNavigateParams& params) { 600 const content::FrameNavigateParams& params) {
601 if (attached() && ZoomPropagatesFromEmbedderToGuest()) 601 if (attached() && ZoomPropagatesFromEmbedderToGuest())
602 SetGuestZoomLevelToMatchEmbedder(); 602 SetGuestZoomLevelToMatchEmbedder();
603
604 // TODO(lazyboy): This breaks guest visibility in --site-per-process because
605 // we do not take the widget's visibility into account. We need to also
606 // stay hidden during "visibility:none" state.
607 if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
608 web_contents()->WasShown();
609 }
610 } 603 }
611 604
612 void GuestViewBase::ActivateContents(WebContents* web_contents) { 605 void GuestViewBase::ActivateContents(WebContents* web_contents) {
613 if (!attached() || !embedder_web_contents()->GetDelegate()) 606 if (!attached() || !embedder_web_contents()->GetDelegate())
614 return; 607 return;
615 608
616 embedder_web_contents()->GetDelegate()->ActivateContents( 609 embedder_web_contents()->GetDelegate()->ActivateContents(
617 embedder_web_contents()); 610 embedder_web_contents());
618 } 611 }
619 612
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 881
889 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 882 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
890 bool due_to_auto_resize) { 883 bool due_to_auto_resize) {
891 if (due_to_auto_resize) 884 if (due_to_auto_resize)
892 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 885 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
893 DispatchOnResizeEvent(guest_size_, new_size); 886 DispatchOnResizeEvent(guest_size_, new_size);
894 guest_size_ = new_size; 887 guest_size_ = new_size;
895 } 888 }
896 889
897 } // namespace guest_view 890 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698