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 // TODO(zijiehe): Retrieve the visibility of toolbar from | |
330 // FullscreenToolbarController. See http://crbug.com/702251. | |
msw
2017/04/05 23:55:11
This looks like the wrong bug? "Event.preventDefau
Hzj_jie
2017/04/06 02:37:59
Maybe I can add both bugs to the comment. The clos
| |
331 return true; | |
332 } | |
333 | |
325 void BrowserWindowCocoa::BookmarkBarStateChanged( | 334 void BrowserWindowCocoa::BookmarkBarStateChanged( |
326 BookmarkBar::AnimateChangeType change_type) { | 335 BookmarkBar::AnimateChangeType change_type) { |
327 [[controller_ bookmarkBarController] | 336 [[controller_ bookmarkBarController] |
328 updateState:browser_->bookmark_bar_state() | 337 updateState:browser_->bookmark_bar_state() |
329 changeType:change_type]; | 338 changeType:change_type]; |
330 } | 339 } |
331 | 340 |
332 void BrowserWindowCocoa::UpdateDevTools() { | 341 void BrowserWindowCocoa::UpdateDevTools() { |
333 [controller_ updateDevToolsForContents: | 342 [controller_ updateDevToolsForContents: |
334 browser_->tab_strip_model()->GetActiveWebContents()]; | 343 browser_->tab_strip_model()->GetActiveWebContents()]; |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
840 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 849 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
841 return [controller_ exclusiveAccessController]; | 850 return [controller_ exclusiveAccessController]; |
842 } | 851 } |
843 | 852 |
844 void BrowserWindowCocoa::ShowImeWarningBubble( | 853 void BrowserWindowCocoa::ShowImeWarningBubble( |
845 const extensions::Extension* extension, | 854 const extensions::Extension* extension, |
846 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 855 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
847 callback) { | 856 callback) { |
848 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 857 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
849 } | 858 } |
OLD | NEW |