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 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
315 } else if (alert_state_ == TabAlertState::AUDIO_MUTING) { | 315 } else if (alert_state_ == TabAlertState::AUDIO_MUTING) { |
316 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_MUTING_MAC, | 316 return l10n_util::GetNSStringF(IDS_WINDOW_AUDIO_MUTING_MAC, |
317 browser_->GetWindowTitleForCurrentTab( | 317 browser_->GetWindowTitleForCurrentTab( |
318 include_app_name), | 318 include_app_name), |
319 base::SysNSStringToUTF16(@"🔇")); | 319 base::SysNSStringToUTF16(@"🔇")); |
320 } | 320 } |
321 return base::SysUTF16ToNSString( | 321 return base::SysUTF16ToNSString( |
322 browser_->GetWindowTitleForCurrentTab(include_app_name)); | 322 browser_->GetWindowTitleForCurrentTab(include_app_name)); |
323 } | 323 } |
324 | 324 |
325 bool BrowserWindowCocoa::IsToolbarShowing() const { | |
326 if (!IsFullscreen()) { | |
327 return true; | |
328 } | |
329 | |
330 // TODO(zijiehe): Retrieve the visibility of toolbar from | |
msw
2017/04/04 19:32:48
Is this okay to leave as a TODO? It seems like tha
Hzj_jie
2017/04/04 20:54:43
As long as this function returns true, the behavio
| |
331 // FullscreenToolbarController. | |
332 return true; | |
333 } | |
334 | |
325 void BrowserWindowCocoa::BookmarkBarStateChanged( | 335 void BrowserWindowCocoa::BookmarkBarStateChanged( |
326 BookmarkBar::AnimateChangeType change_type) { | 336 BookmarkBar::AnimateChangeType change_type) { |
327 [[controller_ bookmarkBarController] | 337 [[controller_ bookmarkBarController] |
328 updateState:browser_->bookmark_bar_state() | 338 updateState:browser_->bookmark_bar_state() |
329 changeType:change_type]; | 339 changeType:change_type]; |
330 } | 340 } |
331 | 341 |
332 void BrowserWindowCocoa::UpdateDevTools() { | 342 void BrowserWindowCocoa::UpdateDevTools() { |
333 [controller_ updateDevToolsForContents: | 343 [controller_ updateDevToolsForContents: |
334 browser_->tab_strip_model()->GetActiveWebContents()]; | 344 browser_->tab_strip_model()->GetActiveWebContents()]; |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 850 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
841 return [controller_ exclusiveAccessController]; | 851 return [controller_ exclusiveAccessController]; |
842 } | 852 } |
843 | 853 |
844 void BrowserWindowCocoa::ShowImeWarningBubble( | 854 void BrowserWindowCocoa::ShowImeWarningBubble( |
845 const extensions::Extension* extension, | 855 const extensions::Extension* extension, |
846 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 856 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
847 callback) { | 857 callback) { |
848 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 858 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
849 } | 859 } |
OLD | NEW |