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

Side by Side Diff: chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm

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, 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 5 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <utility> 9 #include <utility>
10 10
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 } 51 }
52 52
53 void DidShowFullscreenWidget(int routing_id) override { 53 void DidShowFullscreenWidget(int routing_id) override {
54 [controller_ toggleFullscreenWidget:YES]; 54 [controller_ toggleFullscreenWidget:YES];
55 } 55 }
56 56
57 void DidDestroyFullscreenWidget(int routing_id) override { 57 void DidDestroyFullscreenWidget(int routing_id) override {
58 [controller_ toggleFullscreenWidget:NO]; 58 [controller_ toggleFullscreenWidget:NO];
59 } 59 }
60 60
61 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { 61 void DidToggleFullscreenModeForTab(bool entered_fullscreen,
62 bool will_cause_resize) override {
62 [controller_ toggleFullscreenWidget:YES]; 63 [controller_ toggleFullscreenWidget:YES];
63 } 64 }
64 65
65 private: 66 private:
66 TabContentsController* const controller_; 67 TabContentsController* const controller_;
67 68
68 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); 69 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver);
69 }; 70 };
70 71
71 @interface TabContentsController (TabContentsContainerViewDelegate) 72 @interface TabContentsController (TabContentsContainerViewDelegate)
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
349 } else { 350 } else {
350 rect.ClampToCenteredSize(gfx::Size( 351 rect.ClampToCenteredSize(gfx::Size(
351 static_cast<int>(x / captureSize.height()), rect.height())); 352 static_cast<int>(x / captureSize.height()), rect.height()));
352 } 353 }
353 } 354 }
354 355
355 return NSRectFromCGRect(rect.ToCGRect()); 356 return NSRectFromCGRect(rect.ToCGRect());
356 } 357 }
357 358
358 @end 359 @end
OLDNEW
« no previous file with comments | « chrome/browser/ui/chrome_bubble_manager.cc ('k') | chrome/browser/ui/exclusive_access/fullscreen_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698