| 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 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 833 // at this point the controller is dead (autoreleased), so | 833 // at this point the controller is dead (autoreleased), so |
| 834 // make sure we don't try to reference it any more. | 834 // make sure we don't try to reference it any more. |
| 835 } | 835 } |
| 836 | 836 |
| 837 NSWindow* BrowserWindowCocoa::window() const { | 837 NSWindow* BrowserWindowCocoa::window() const { |
| 838 return [controller_ window]; | 838 return [controller_ window]; |
| 839 } | 839 } |
| 840 | 840 |
| 841 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( | 841 void BrowserWindowCocoa::ShowAvatarBubbleFromAvatarButton( |
| 842 AvatarBubbleMode mode, | 842 AvatarBubbleMode mode, |
| 843 const signin::ManageAccountsParams& manage_accounts_params) { | 843 const signin::ManageAccountsParams& manage_accounts_params, |
| 844 signin_metrics::AccessPoint access_point) { |
| 844 AvatarBaseController* controller = [controller_ avatarButtonController]; | 845 AvatarBaseController* controller = [controller_ avatarButtonController]; |
| 845 NSView* anchor = [controller buttonView]; | 846 NSView* anchor = [controller buttonView]; |
| 846 if ([anchor isHiddenOrHasHiddenAncestor]) | 847 if ([anchor isHiddenOrHasHiddenAncestor]) |
| 847 anchor = [[controller_ toolbarController] wrenchButton]; | 848 anchor = [[controller_ toolbarController] wrenchButton]; |
| 848 [controller showAvatarBubbleAnchoredAt:anchor | 849 [controller showAvatarBubbleAnchoredAt:anchor |
| 849 withMode:mode | 850 withMode:mode |
| 850 withServiceType:manage_accounts_params.service_type]; | 851 withServiceType:manage_accounts_params.service_type |
| 852 fromAccessPoint:access_point]; |
| 851 } | 853 } |
| 852 | 854 |
| 853 int | 855 int |
| 854 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() { | 856 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() { |
| 855 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) | 857 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) |
| 856 return 0; | 858 return 0; |
| 857 return 40; | 859 return 40; |
| 858 } | 860 } |
| 859 | 861 |
| 860 void BrowserWindowCocoa::ExecuteExtensionCommand( | 862 void BrowserWindowCocoa::ExecuteExtensionCommand( |
| (...skipping 17 matching lines...) Expand all Loading... |
| 878 void BrowserWindowCocoa::UnhideDownloadShelf() { | 880 void BrowserWindowCocoa::UnhideDownloadShelf() { |
| 879 GetDownloadShelf()->Unhide(); | 881 GetDownloadShelf()->Unhide(); |
| 880 } | 882 } |
| 881 | 883 |
| 882 void BrowserWindowCocoa::HideDownloadShelf() { | 884 void BrowserWindowCocoa::HideDownloadShelf() { |
| 883 GetDownloadShelf()->Hide(); | 885 GetDownloadShelf()->Hide(); |
| 884 StatusBubble* statusBubble = GetStatusBubble(); | 886 StatusBubble* statusBubble = GetStatusBubble(); |
| 885 if (statusBubble) | 887 if (statusBubble) |
| 886 statusBubble->Hide(); | 888 statusBubble->Hide(); |
| 887 } | 889 } |
| OLD | NEW |