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

Unified Diff: chrome/browser/cocoa/browser_window_controller.mm

Issue 3136003: [Mac] Refactor the fullscreen code to move logic from BWC into FullscreenCont... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/cocoa/browser_window_controller.mm
===================================================================
--- chrome/browser/cocoa/browser_window_controller.mm (revision 58173)
+++ chrome/browser/cocoa/browser_window_controller.mm (working copy)
@@ -446,7 +446,7 @@
// TODO(viettrungluu): For some reason, the above doesn't suffice.
if ([self isFullscreen])
- [floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
+ [[fullscreenController_ floatingBarBackingView] setNeedsDisplay:YES];
}
- (void)windowDidResignMain:(NSNotification*)notification {
@@ -456,7 +456,7 @@
// TODO(viettrungluu): For some reason, the above doesn't suffice.
if ([self isFullscreen])
- [floatingBarBackingView_ setNeedsDisplay:YES]; // Okay even if nil.
+ [[fullscreenController_ floatingBarBackingView] setNeedsDisplay:YES];
}
// Called when we are activated (when we gain focus).
@@ -1268,11 +1268,6 @@
[findBarCocoaController_ positionFindBarViewAtMaxY:maxY maxWidth:maxWidth];
}
-- (NSWindow*)createFullscreenWindow {
- return [[[FullscreenWindow alloc] initForScreen:[[self window] screen]]
- autorelease];
-}
-
- (NSInteger)numberOfTabs {
// count() includes pinned tabs (both live and phantom).
return browser_->tabstrip_model()->count();
@@ -1716,7 +1711,7 @@
if (fullscreen) {
DCHECK(!savedRegularWindow_);
savedRegularWindow_ = [window retain];
- destWindow = [self createFullscreenWindow];
+ destWindow = [fullscreenController_ window];
} else {
DCHECK(savedRegularWindow_);
destWindow = [savedRegularWindow_ autorelease];
@@ -1797,12 +1792,7 @@
[self layoutSubviews];
}
-- (CGFloat)floatingBarShownFraction {
- return floatingBarShownFraction_;
-}
-
-- (void)setFloatingBarShownFraction:(CGFloat)fraction {
- floatingBarShownFraction_ = fraction;
+- (void)floatingBarShownFractionChanged {
[self layoutSubviews];
}
« no previous file with comments | « chrome/browser/cocoa/browser_window_controller.h ('k') | chrome/browser/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698