| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |