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 [self browserWindow]->UpdateMediaState(mediaState); | |
miu
2015/10/21 20:06:52
Rather than declare the UpdateMediaState() method
| |
1900 } | |
1901 | |
1898 @end // @implementation BrowserWindowController | 1902 @end // @implementation BrowserWindowController |
1899 | 1903 |
1900 @implementation BrowserWindowController(Fullscreen) | 1904 @implementation BrowserWindowController(Fullscreen) |
1901 | 1905 |
1902 - (void)handleLionToggleFullscreen { | 1906 - (void)handleLionToggleFullscreen { |
1903 DCHECK(base::mac::IsOSLionOrLater()); | 1907 DCHECK(base::mac::IsOSLionOrLater()); |
1904 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); | 1908 chrome::ExecuteCommand(browser_.get(), IDC_FULLSCREEN); |
1905 } | 1909 } |
1906 | 1910 |
1907 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { | 1911 - (void)enterBrowserFullscreenWithToolbar:(BOOL)withToolbar { |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2060 | 2064 |
2061 - (BOOL)supportsBookmarkBar { | 2065 - (BOOL)supportsBookmarkBar { |
2062 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; | 2066 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; |
2063 } | 2067 } |
2064 | 2068 |
2065 - (BOOL)isTabbedWindow { | 2069 - (BOOL)isTabbedWindow { |
2066 return browser_->is_type_tabbed(); | 2070 return browser_->is_type_tabbed(); |
2067 } | 2071 } |
2068 | 2072 |
2069 @end // @implementation BrowserWindowController(WindowType) | 2073 @end // @implementation BrowserWindowController(WindowType) |
OLD | NEW |