OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <numeric> | 8 #include <numeric> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 | 1882 |
1883 - (void)executeExtensionCommand:(const std::string&)extension_id | 1883 - (void)executeExtensionCommand:(const std::string&)extension_id |
1884 command:(const extensions::Command&)command { | 1884 command:(const extensions::Command&)command { |
1885 // Global commands are handled by the ExtensionCommandsGlobalRegistry | 1885 // Global commands are handled by the ExtensionCommandsGlobalRegistry |
1886 // instance. | 1886 // instance. |
1887 DCHECK(!command.global()); | 1887 DCHECK(!command.global()); |
1888 extension_keybinding_registry_->ExecuteCommand(extension_id, | 1888 extension_keybinding_registry_->ExecuteCommand(extension_id, |
1889 command.accelerator()); | 1889 command.accelerator()); |
1890 } | 1890 } |
1891 | 1891 |
1892 - (void)setMediaState:(TabMediaState)mediaState { | 1892 - (void)setAlertState:(TabAlertState)alertState { |
1893 static_cast<BrowserWindowCocoa*>([self browserWindow]) | 1893 static_cast<BrowserWindowCocoa*>([self browserWindow]) |
1894 ->UpdateMediaState(mediaState); | 1894 ->UpdateAlertState(alertState); |
1895 } | 1895 } |
1896 | 1896 |
1897 - (TabMediaState)mediaState { | 1897 - (TabAlertState)alertState { |
1898 return static_cast<BrowserWindowCocoa*>([self browserWindow])->media_state(); | 1898 return static_cast<BrowserWindowCocoa*>([self browserWindow])->alert_state(); |
1899 } | 1899 } |
1900 | 1900 |
1901 @end // @implementation BrowserWindowController | 1901 @end // @implementation BrowserWindowController |
1902 | 1902 |
1903 @implementation BrowserWindowController(Fullscreen) | 1903 @implementation BrowserWindowController(Fullscreen) |
1904 | 1904 |
1905 - (void)handleLionToggleFullscreen { | 1905 - (void)handleLionToggleFullscreen { |
1906 DCHECK(base::mac::IsOSLionOrLater()); | 1906 DCHECK(base::mac::IsOSLionOrLater()); |
1907 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); | 1907 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); |
1908 } | 1908 } |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2097 | 2097 |
2098 - (BOOL)supportsBookmarkBar { | 2098 - (BOOL)supportsBookmarkBar { |
2099 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2099 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2100 } | 2100 } |
2101 | 2101 |
2102 - (BOOL)isTabbedWindow { | 2102 - (BOOL)isTabbedWindow { |
2103 return browser_->is_type_tabbed(); | 2103 return browser_->is_type_tabbed(); |
2104 } | 2104 } |
2105 | 2105 |
2106 @end // @implementation BrowserWindowController(WindowType) | 2106 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |