| 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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 } | 435 } |
| 436 | 436 |
| 437 bool BrowserWindowCocoa::SupportsFullscreenWithToolbar() const { | 437 bool BrowserWindowCocoa::SupportsFullscreenWithToolbar() const { |
| 438 return chrome::mac::SupportsSystemFullscreen(); | 438 return chrome::mac::SupportsSystemFullscreen(); |
| 439 } | 439 } |
| 440 | 440 |
| 441 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) { | 441 void BrowserWindowCocoa::UpdateFullscreenWithToolbar(bool with_toolbar) { |
| 442 [controller_ updateFullscreenWithToolbar:with_toolbar]; | 442 [controller_ updateFullscreenWithToolbar:with_toolbar]; |
| 443 } | 443 } |
| 444 | 444 |
| 445 void BrowserWindowCocoa::ToggleFullscreenToolbar() { |
| 446 [controller_ toggleFullscreenToolbar]; |
| 447 } |
| 448 |
| 445 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const { | 449 bool BrowserWindowCocoa::IsFullscreenWithToolbar() const { |
| 446 return IsFullscreen() && ![controller_ inPresentationMode]; | 450 return IsFullscreen() && ![controller_ inPresentationMode]; |
| 447 } | 451 } |
| 448 | 452 |
| 453 bool BrowserWindowCocoa::ShouldHideFullscreenToolbar() const { |
| 454 return [controller_ shouldHideFullscreenToolbar]; |
| 455 } |
| 456 |
| 449 void BrowserWindowCocoa::ConfirmAddSearchProvider( | 457 void BrowserWindowCocoa::ConfirmAddSearchProvider( |
| 450 TemplateURL* template_url, | 458 TemplateURL* template_url, |
| 451 Profile* profile) { | 459 Profile* profile) { |
| 452 // The controller will release itself when the window closes. | 460 // The controller will release itself when the window closes. |
| 453 EditSearchEngineCocoaController* editor = | 461 EditSearchEngineCocoaController* editor = |
| 454 [[EditSearchEngineCocoaController alloc] initWithProfile:profile | 462 [[EditSearchEngineCocoaController alloc] initWithProfile:profile |
| 455 delegate:NULL | 463 delegate:NULL |
| 456 templateURL:template_url]; | 464 templateURL:template_url]; |
| 457 [NSApp beginSheet:[editor window] | 465 [NSApp beginSheet:[editor window] |
| 458 modalForWindow:window() | 466 modalForWindow:window() |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 void BrowserWindowCocoa::UnhideDownloadShelf() { | 871 void BrowserWindowCocoa::UnhideDownloadShelf() { |
| 864 GetDownloadShelf()->Unhide(); | 872 GetDownloadShelf()->Unhide(); |
| 865 } | 873 } |
| 866 | 874 |
| 867 void BrowserWindowCocoa::HideDownloadShelf() { | 875 void BrowserWindowCocoa::HideDownloadShelf() { |
| 868 GetDownloadShelf()->Hide(); | 876 GetDownloadShelf()->Hide(); |
| 869 StatusBubble* statusBubble = GetStatusBubble(); | 877 StatusBubble* statusBubble = GetStatusBubble(); |
| 870 if (statusBubble) | 878 if (statusBubble) |
| 871 statusBubble->Hide(); | 879 statusBubble->Hide(); |
| 872 } | 880 } |
| OLD | NEW |