| 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 783 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 794 // make sure we don't try to reference it any more. | 794 // make sure we don't try to reference it any more. |
| 795 } | 795 } |
| 796 | 796 |
| 797 NSWindow* BrowserWindowCocoa::window() const { | 797 NSWindow* BrowserWindowCocoa::window() const { |
| 798 return [controller_ window]; | 798 return [controller_ window]; |
| 799 } | 799 } |
| 800 | 800 |
| 801 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( | 801 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( |
| 802 AvatarBubbleMode mode, | 802 AvatarBubbleMode mode, |
| 803 const signin::ManageAccountsParams& manage_accounts_params, | 803 const signin::ManageAccountsParams& manage_accounts_params, |
| 804 signin_metrics::AccessPoint access_point) { | 804 signin_metrics::AccessPoint access_point, |
| 805 bool is_source_keyboard) { |
| 805 profiles::BubbleViewMode bubble_view_mode; | 806 profiles::BubbleViewMode bubble_view_mode; |
| 806 profiles::TutorialMode tutorial_mode; | 807 profiles::TutorialMode tutorial_mode; |
| 807 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, | 808 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, |
| 808 &tutorial_mode); | 809 &tutorial_mode); |
| 809 | 810 |
| 810 if (SigninViewController::ShouldShowModalSigninForMode(bubble_view_mode)) { | 811 if (SigninViewController::ShouldShowModalSigninForMode(bubble_view_mode)) { |
| 811 browser_->ShowModalSigninWindow(bubble_view_mode, access_point); | 812 browser_->ShowModalSigninWindow(bubble_view_mode, access_point); |
| 812 } else { | 813 } else { |
| 813 AvatarBaseController* controller = [controller_ avatarButtonController]; | 814 AvatarBaseController* controller = [controller_ avatarButtonController]; |
| 814 NSView* anchor = [controller buttonView]; | 815 NSView* anchor = [controller buttonView]; |
| (...skipping 22 matching lines...) Expand all Loading... |
| 837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 838 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
| 838 return [controller_ exclusiveAccessController]; | 839 return [controller_ exclusiveAccessController]; |
| 839 } | 840 } |
| 840 | 841 |
| 841 void BrowserWindowCocoa::ShowImeWarningBubble( | 842 void BrowserWindowCocoa::ShowImeWarningBubble( |
| 842 const extensions::Extension* extension, | 843 const extensions::Extension* extension, |
| 843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 844 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
| 844 callback) { | 845 callback) { |
| 845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 846 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
| 846 } | 847 } |
| OLD | NEW |