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 "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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |