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 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 1877 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1888 | 1888 |
1889 - (void)executeExtensionCommand:(const std::string&)extension_id | 1889 - (void)executeExtensionCommand:(const std::string&)extension_id |
1890 command:(const extensions::Command&)command { | 1890 command:(const extensions::Command&)command { |
1891 // Global commands are handled by the ExtensionCommandsGlobalRegistry | 1891 // Global commands are handled by the ExtensionCommandsGlobalRegistry |
1892 // instance. | 1892 // instance. |
1893 DCHECK(!command.global()); | 1893 DCHECK(!command.global()); |
1894 extension_keybinding_registry_->ExecuteCommand(extension_id, | 1894 extension_keybinding_registry_->ExecuteCommand(extension_id, |
1895 command.accelerator()); | 1895 command.accelerator()); |
1896 } | 1896 } |
1897 | 1897 |
| 1898 - (void)setMediaState:(TabMediaState)mediaState { |
| 1899 static_cast<BrowserWindowCocoa*>([self browserWindow]) |
| 1900 ->UpdateMediaState(mediaState); |
| 1901 } |
| 1902 |
| 1903 - (TabMediaState)mediaState { |
| 1904 return static_cast<BrowserWindowCocoa*>([self browserWindow])->media_state(); |
| 1905 } |
| 1906 |
1898 @end // @implementation BrowserWindowController | 1907 @end // @implementation BrowserWindowController |
1899 | 1908 |
1900 @implementation BrowserWindowController(Fullscreen) | 1909 @implementation BrowserWindowController(Fullscreen) |
1901 | 1910 |
1902 - (void)handleLionToggleFullscreen { | 1911 - (void)handleLionToggleFullscreen { |
1903 DCHECK(base::mac::IsOSLionOrLater()); | 1912 DCHECK(base::mac::IsOSLionOrLater()); |
1904 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); | 1913 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); |
1905 } | 1914 } |
1906 | 1915 |
1907 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { | 1916 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2060 | 2069 |
2061 - (BOOL)supportsBookmarkBar { | 2070 - (BOOL)supportsBookmarkBar { |
2062 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2071 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2063 } | 2072 } |
2064 | 2073 |
2065 - (BOOL)isTabbedWindow { | 2074 - (BOOL)isTabbedWindow { |
2066 return browser_->is_type_tabbed(); | 2075 return browser_->is_type_tabbed(); |
2067 } | 2076 } |
2068 | 2077 |
2069 @end // @implementation BrowserWindowController(WindowType) | 2078 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |