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 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 } | 426 } |
427 | 427 |
428 bool BrowserWindowCocoa::IsFullscreen() const { | 428 bool BrowserWindowCocoa::IsFullscreen() const { |
429 return [controller_ isInAnyFullscreenMode]; | 429 return [controller_ isInAnyFullscreenMode]; |
430 } | 430 } |
431 | 431 |
432 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { | 432 bool BrowserWindowCocoa::IsFullscreenBubbleVisible() const { |
433 return false; // Currently only called from toolkit-views website_settings. | 433 return false; // Currently only called from toolkit-views website_settings. |
434 } | 434 } |
435 | 435 |
436 void BrowserWindowCocoa::ShowNewBackShortcutBubble(bool forward) { | 436 void BrowserWindowCocoa::MaybeShowNewBackShortcutBubble(bool forward) { |
437 ExclusiveAccessController* exclusive_access_controller = | 437 [controller_ exclusiveAccessController]->MaybeShowNewBackShortcutBubble( |
438 [controller_ exclusiveAccessController]; | 438 forward); |
439 exclusive_access_controller->ShowNewBackShortcutBubble(forward); | 439 } |
| 440 |
| 441 void BrowserWindowCocoa::HideNewBackShortcutBubble() { |
| 442 [controller_ exclusiveAccessController]->HideNewBackShortcutBubble(); |
440 } | 443 } |
441 | 444 |
442 LocationBar* BrowserWindowCocoa::GetLocationBar() const { | 445 LocationBar* BrowserWindowCocoa::GetLocationBar() const { |
443 return [controller_ locationBarBridge]; | 446 return [controller_ locationBarBridge]; |
444 } | 447 } |
445 | 448 |
446 void BrowserWindowCocoa::SetFocusToLocationBar(bool select_all) { | 449 void BrowserWindowCocoa::SetFocusToLocationBar(bool select_all) { |
447 [controller_ focusLocationBar:select_all ? YES : NO]; | 450 [controller_ focusLocationBar:select_all ? YES : NO]; |
448 } | 451 } |
449 | 452 |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
834 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
835 return [controller_ exclusiveAccessController]; | 838 return [controller_ exclusiveAccessController]; |
836 } | 839 } |
837 | 840 |
838 void BrowserWindowCocoa::ShowImeWarningBubble( | 841 void BrowserWindowCocoa::ShowImeWarningBubble( |
839 const extensions::Extension* extension, | 842 const extensions::Extension* extension, |
840 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
841 callback) { | 844 callback) { |
842 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
843 } | 846 } |
OLD | NEW |