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

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: Trying to fix test broken on Mac Created 5 years 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 <utility> 7 #include <utility>
8 8
9 #include "base/mac/scoped_cftyperef.h" 9 #include "base/mac/scoped_cftyperef.h"
10 #include "base/mac/scoped_nsobject.h" 10 #include "base/mac/scoped_nsobject.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 } 48 }
49 49
50 void DidShowFullscreenWidget(int routing_id) override { 50 void DidShowFullscreenWidget(int routing_id) override {
51 [controller_ toggleFullscreenWidget:YES]; 51 [controller_ toggleFullscreenWidget:YES];
52 } 52 }
53 53
54 void DidDestroyFullscreenWidget(int routing_id) override { 54 void DidDestroyFullscreenWidget(int routing_id) override {
55 [controller_ toggleFullscreenWidget:NO]; 55 [controller_ toggleFullscreenWidget:NO];
56 } 56 }
57 57
58 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { 58 void DidToggleFullscreenModeForTab(bool entered_fullscreen,
59 bool will_cause_resize) override {
59 [controller_ toggleFullscreenWidget:YES]; 60 [controller_ toggleFullscreenWidget:YES];
60 } 61 }
61 62
62 private: 63 private:
63 TabContentsController* const controller_; 64 TabContentsController* const controller_;
64 65
65 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver); 66 DISALLOW_COPY_AND_ASSIGN(FullscreenObserver);
66 }; 67 };
67 68
68 @interface TabContentsController (TabContentsContainerViewDelegate) 69 @interface TabContentsController (TabContentsContainerViewDelegate)
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 } else { 348 } else {
348 rect.ClampToCenteredSize(gfx::Size( 349 rect.ClampToCenteredSize(gfx::Size(
349 static_cast<int>(x / captureSize.height()), rect.height())); 350 static_cast<int>(x / captureSize.height()), rect.height()));
350 } 351 }
351 } 352 }
352 353
353 return NSRectFromCGRect(rect.ToCGRect()); 354 return NSRectFromCGRect(rect.ToCGRect());
354 } 355 }
355 356
356 @end 357 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698