| 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 AvatarBubbleMode mode, | 804 AvatarBubbleMode mode, |
| 805 const signin::ManageAccountsParams& manage_accounts_params, | 805 const signin::ManageAccountsParams& manage_accounts_params, |
| 806 signin_metrics::AccessPoint access_point, | 806 signin_metrics::AccessPoint access_point, |
| 807 bool is_source_keyboard) { | 807 bool is_source_keyboard) { |
| 808 profiles::BubbleViewMode bubble_view_mode; | 808 profiles::BubbleViewMode bubble_view_mode; |
| 809 profiles::TutorialMode tutorial_mode; | 809 profiles::TutorialMode tutorial_mode; |
| 810 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, | 810 profiles::BubbleViewModeFromAvatarBubbleMode(mode, &bubble_view_mode, |
| 811 &tutorial_mode); | 811 &tutorial_mode); |
| 812 | 812 |
| 813 if (SigninViewController::ShouldShowModalSigninForMode(bubble_view_mode)) { | 813 if (SigninViewController::ShouldShowModalSigninForMode(bubble_view_mode)) { |
| 814 browser_->ShowModalSigninWindow(bubble_view_mode, access_point); | 814 browser_->signin_view_controller()->ShowModalSignin(bubble_view_mode, |
| 815 browser_, access_point); |
| 815 } else { | 816 } else { |
| 816 AvatarBaseController* controller = [controller_ avatarButtonController]; | 817 AvatarBaseController* controller = [controller_ avatarButtonController]; |
| 817 NSView* anchor = [controller buttonView]; | 818 NSView* anchor = [controller buttonView]; |
| 818 if ([anchor isHiddenOrHasHiddenAncestor]) | 819 if ([anchor isHiddenOrHasHiddenAncestor]) |
| 819 anchor = [[controller_ toolbarController] appMenuButton]; | 820 anchor = [[controller_ toolbarController] appMenuButton]; |
| 820 [controller showAvatarBubbleAnchoredAt:anchor | 821 [controller showAvatarBubbleAnchoredAt:anchor |
| 821 withMode:mode | 822 withMode:mode |
| 822 withServiceType:manage_accounts_params.service_type | 823 withServiceType:manage_accounts_params.service_type |
| 823 fromAccessPoint:access_point]; | 824 fromAccessPoint:access_point]; |
| 824 } | 825 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 840 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 841 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
| 841 return [controller_ exclusiveAccessController]; | 842 return [controller_ exclusiveAccessController]; |
| 842 } | 843 } |
| 843 | 844 |
| 844 void BrowserWindowCocoa::ShowImeWarningBubble( | 845 void BrowserWindowCocoa::ShowImeWarningBubble( |
| 845 const extensions::Extension* extension, | 846 const extensions::Extension* extension, |
| 846 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 847 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
| 847 callback) { | 848 callback) { |
| 848 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 849 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
| 849 } | 850 } |
| OLD | NEW |