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

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

Issue 1488653002: Fix scroll restoration when exiting fullscreen mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Accidentally made will_cause_resize always false in previous cleanup. Fixed 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 Destroy(); 76 Destroy();
77 } 77 }
78 78
79 void RenderProcessGone(base::TerminationStatus status) override { 79 void RenderProcessGone(base::TerminationStatus status) override {
80 if (destroyed_) 80 if (destroyed_)
81 return; 81 return;
82 // If the embedder process is destroyed, then destroy the guest. 82 // If the embedder process is destroyed, then destroy the guest.
83 Destroy(); 83 Destroy();
84 } 84 }
85 85
86 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { 86 void DidToggleFullscreenModeForTab(bool entered_fullscreen,
87 bool will_cause_resize) override {
87 if (destroyed_) 88 if (destroyed_)
88 return; 89 return;
89 90
90 is_fullscreen_ = entered_fullscreen; 91 is_fullscreen_ = entered_fullscreen;
91 guest_->EmbedderFullscreenToggled(is_fullscreen_); 92 guest_->EmbedderFullscreenToggled(is_fullscreen_);
92 } 93 }
93 94
94 void MainFrameWasResized(bool width_changed) override { 95 void MainFrameWasResized(bool width_changed) override {
95 if (destroyed_ || !web_contents()->GetDelegate()) 96 if (destroyed_ || !web_contents()->GetDelegate())
96 return; 97 return;
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after
887 888
888 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size, 889 void GuestViewBase::UpdateGuestSize(const gfx::Size& new_size,
889 bool due_to_auto_resize) { 890 bool due_to_auto_resize) {
890 if (due_to_auto_resize) 891 if (due_to_auto_resize)
891 GuestSizeChangedDueToAutoSize(guest_size_, new_size); 892 GuestSizeChangedDueToAutoSize(guest_size_, new_size);
892 DispatchOnResizeEvent(guest_size_, new_size); 893 DispatchOnResizeEvent(guest_size_, new_size);
893 guest_size_ = new_size; 894 guest_size_ = new_size;
894 } 895 }
895 896
896 } // namespace guest_view 897 } // namespace guest_view
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698