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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 836933005: Refactor fullscreen_controller. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync to TOT Created 5 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 (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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #import "base/mac/sdk_forward_declarations.h" 10 #import "base/mac/sdk_forward_declarations.h"
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
354 [window() zoom:controller_]; // Toggles zoom mode. 354 [window() zoom:controller_]; // Toggles zoom mode.
355 else if (IsMinimized()) 355 else if (IsMinimized())
356 [window() deminiaturize:controller_]; 356 [window() deminiaturize:controller_];
357 } 357 }
358 358
359 // See browser_window_controller.h for a detailed explanation of the logic in 359 // See browser_window_controller.h for a detailed explanation of the logic in
360 // this method. 360 // this method.
361 void BrowserWindowCocoa::EnterFullscreen(const GURL& url, 361 void BrowserWindowCocoa::EnterFullscreen(const GURL& url,
362 ExclusiveAccessBubbleType bubble_type, 362 ExclusiveAccessBubbleType bubble_type,
363 bool with_toolbar) { 363 bool with_toolbar) {
364 if (browser_->fullscreen_controller()->IsWindowFullscreenForTabOrPending()) 364 if (browser_->exclusive_access_manager()
365 ->fullscreen_controller()
366 ->IsWindowFullscreenForTabOrPending())
365 [controller_ enterWebContentFullscreenForURL:url bubbleType:bubble_type]; 367 [controller_ enterWebContentFullscreenForURL:url bubbleType:bubble_type];
366 else if (!url.is_empty()) 368 else if (!url.is_empty())
367 [controller_ enterExtensionFullscreenForURL:url bubbleType:bubble_type]; 369 [controller_ enterExtensionFullscreenForURL:url bubbleType:bubble_type];
368 else 370 else
369 [controller_ enterBrowserFullscreenWithToolbar:with_toolbar]; 371 [controller_ enterBrowserFullscreenWithToolbar:with_toolbar];
370 } 372 }
371 373
372 void BrowserWindowCocoa::ExitFullscreen() { 374 void BrowserWindowCocoa::ExitFullscreen() {
373 [controller_ exitAnyFullscreen]; 375 [controller_ exitAnyFullscreen];
374 } 376 }
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
818 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) 820 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED)
819 return 0; 821 return 0;
820 return 40; 822 return 40;
821 } 823 }
822 824
823 void BrowserWindowCocoa::ExecuteExtensionCommand( 825 void BrowserWindowCocoa::ExecuteExtensionCommand(
824 const extensions::Extension* extension, 826 const extensions::Extension* extension,
825 const extensions::Command& command) { 827 const extensions::Command& command) {
826 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; 828 [cocoa_controller() executeExtensionCommand:extension->id() command:command];
827 } 829 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_win.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698