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 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 | 613 |
614 void BrowserWindowCocoa::Paste() { | 614 void BrowserWindowCocoa::Paste() { |
615 [NSApp sendAction:@selector(paste:) to:nil from:nil]; | 615 [NSApp sendAction:@selector(paste:) to:nil from:nil]; |
616 } | 616 } |
617 | 617 |
618 void BrowserWindowCocoa::EnterFullscreenWithChrome() { | 618 void BrowserWindowCocoa::EnterFullscreenWithChrome() { |
619 CHECK(chrome::mac::SupportsSystemFullscreen()); | 619 CHECK(chrome::mac::SupportsSystemFullscreen()); |
620 [controller_ enterFullscreenWithChrome]; | 620 [controller_ enterFullscreenWithChrome]; |
621 } | 621 } |
622 | 622 |
| 623 void BrowserWindowCocoa::EnterFullscreenWithoutChrome() { |
| 624 CHECK(chrome::mac::SupportsSystemFullscreen()); |
| 625 [controller_ enterPresentationMode]; |
| 626 } |
| 627 |
623 bool BrowserWindowCocoa::IsFullscreenWithChrome() { | 628 bool BrowserWindowCocoa::IsFullscreenWithChrome() { |
624 return IsFullscreen() && ![controller_ inPresentationMode]; | 629 return IsFullscreen() && ![controller_ inPresentationMode]; |
625 } | 630 } |
626 | 631 |
627 bool BrowserWindowCocoa::IsFullscreenWithoutChrome() { | 632 bool BrowserWindowCocoa::IsFullscreenWithoutChrome() { |
628 return IsFullscreen() && [controller_ inPresentationMode]; | 633 return IsFullscreen() && [controller_ inPresentationMode]; |
629 } | 634 } |
630 | 635 |
631 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( | 636 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( |
632 const gfx::Rect& bounds) { | 637 const gfx::Rect& bounds) { |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 711 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
707 return 0; | 712 return 0; |
708 return 40; | 713 return 40; |
709 } | 714 } |
710 | 715 |
711 void BrowserWindowCocoa::ExecuteExtensionCommand( | 716 void BrowserWindowCocoa::ExecuteExtensionCommand( |
712 const extensions::Extension* extension, | 717 const extensions::Extension* extension, |
713 const extensions::Command& command) { | 718 const extensions::Command& command) { |
714 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; | 719 [cocoa_controller() executeExtensionCommand:extension->id() command:command]; |
715 } | 720 } |
OLD | NEW |