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

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: Created 4 years, 11 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 581 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 592
593 // Self-destruct. 593 // Self-destruct.
594 delete this; 594 delete this;
595 } 595 }
596 596
597 void GuestViewBase::DidNavigateMainFrame( 597 void GuestViewBase::DidNavigateMainFrame(
598 const content::LoadCommittedDetails& details, 598 const content::LoadCommittedDetails& details,
599 const content::FrameNavigateParams& params) { 599 const content::FrameNavigateParams& params) {
600 if (attached() && ZoomPropagatesFromEmbedderToGuest()) 600 if (attached() && ZoomPropagatesFromEmbedderToGuest())
601 SetGuestZoomLevelToMatchEmbedder(); 601 SetGuestZoomLevelToMatchEmbedder();
602
603 // TODO(lazyboy): This breaks guest visibility in --site-per-process because
lazyboy 2016/01/16 00:46:47 Great. Does this take care of all the visibility r
EhsanK 2016/01/20 00:00:03 We had three visibility tests where the first two
604 // we do not take the widget's visibility into account. We need to also
605 // stay hidden during "visibility:none" state.
606 if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
607 web_contents()->WasShown();
608 }
609 } 602 }
610 603
611 void GuestViewBase::ActivateContents(WebContents* web_contents) { 604 void GuestViewBase::ActivateContents(WebContents* web_contents) {
612 if (!attached() || !embedder_web_contents()->GetDelegate()) 605 if (!attached() || !embedder_web_contents()->GetDelegate())
613 return; 606 return;
614 607
615 embedder_web_contents()->GetDelegate()->ActivateContents( 608 embedder_web_contents()->GetDelegate()->ActivateContents(
616 embedder_web_contents()); 609 embedder_web_contents());
617 } 610 }
618 611
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 880
888 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 881 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
889 bool due_to_auto_resize) { 882 bool due_to_auto_resize) {
890 if (due_to_auto_resize) 883 if (due_to_auto_resize)
891 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 884 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
892 DispatchOnResizeEvent(guest_size_, new_size); 885 DispatchOnResizeEvent(guest_size_, new_size);
893 guest_size_ = new_size; 886 guest_size_ = new_size;
894 } 887 }
895 888
896 } // namespace guest_view 889 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698