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

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: BrowserPluginGuest does not Change Visibility of OOPIF-<webview> 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 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 594
595 // Self-destruct. 595 // Self-destruct.
596 delete this; 596 delete this;
597 } 597 }
598 598
599 void GuestViewBase::DidNavigateMainFrame( 599 void GuestViewBase::DidNavigateMainFrame(
600 const content::LoadCommittedDetails& details, 600 const content::LoadCommittedDetails& details,
601 const content::FrameNavigateParams& params) { 601 const content::FrameNavigateParams& params) {
602 if (attached() && ZoomPropagatesFromEmbedderToGuest()) 602 if (attached() && ZoomPropagatesFromEmbedderToGuest())
603 SetGuestZoomLevelToMatchEmbedder(); 603 SetGuestZoomLevelToMatchEmbedder();
604
605 // TODO(lazyboy): This breaks guest visibility in --site-per-process because
606 // we do not take the widget's visibility into account. We need to also
607 // stay hidden during "visibility:none" state.
608 if (content::BrowserPluginGuestMode::UseCrossProcessFramesForGuests()) {
609 web_contents()->WasShown();
610 }
611 } 604 }
612 605
613 void GuestViewBase::ActivateContents(WebContents* web_contents) { 606 void GuestViewBase::ActivateContents(WebContents* web_contents) {
614 if (!attached() || !embedder_web_contents()->GetDelegate()) 607 if (!attached() || !embedder_web_contents()->GetDelegate())
615 return; 608 return;
616 609
617 embedder_web_contents()->GetDelegate()->ActivateContents( 610 embedder_web_contents()->GetDelegate()->ActivateContents(
618 embedder_web_contents()); 611 embedder_web_contents());
619 } 612 }
620 613
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 883
891 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 884 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
892 bool due_to_auto_resize) { 885 bool due_to_auto_resize) {
893 if (due_to_auto_resize) 886 if (due_to_auto_resize)
894 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 887 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
895 DispatchOnResizeEvent(guest_size_, new_size); 888 DispatchOnResizeEvent(guest_size_, new_size);
896 guest_size_ = new_size; 889 guest_size_ = new_size;
897 } 890 }
898 891
899 } // namespace guest_view 892 } // namespace guest_view
OLDNEW
« no previous file with comments | « chrome/browser/apps/guest_view/web_view_browsertest.cc ('k') | content/browser/browser_plugin/browser_plugin_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698