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)getMediaState { |
| 1904 return static_cast<BrowserWindowCocoa*>([self browserWindow]) |
| 1905 ->GetMediaState(); |
| 1906 } |
| 1907 |
1898 @end // @implementation BrowserWindowController | 1908 @end // @implementation BrowserWindowController |
1899 | 1909 |
1900 @implementation BrowserWindowController(Fullscreen) | 1910 @implementation BrowserWindowController(Fullscreen) |
1901 | 1911 |
1902 - (void)handleLionToggleFullscreen { | 1912 - (void)handleLionToggleFullscreen { |
1903 DCHECK(base::mac::IsOSLionOrLater()); | 1913 DCHECK(base::mac::IsOSLionOrLater()); |
1904 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); | 1914 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); |
1905 } | 1915 } |
1906 | 1916 |
1907 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { | 1917 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2060 | 2070 |
2061 - (BOOL)supportsBookmarkBar { | 2071 - (BOOL)supportsBookmarkBar { |
2062 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2072 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2063 } | 2073 } |
2064 | 2074 |
2065 - (BOOL)isTabbedWindow { | 2075 - (BOOL)isTabbedWindow { |
2066 return browser_->is_type_tabbed(); | 2076 return browser_->is_type_tabbed(); |
2067 } | 2077 } |
2068 | 2078 |
2069 @end // @implementation BrowserWindowController(WindowType) | 2079 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |