Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(860)

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_cocoa.mm

Issue 1235173002: Revert of Chrome user menu shouldn't close if a tab steals focus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 const signin::ManageAccountsParams& manage_accounts_params) { 796 const signin::ManageAccountsParams& manage_accounts_params) {
797 AvatarBaseController* controller = [controller_ avatarButtonController]; 797 AvatarBaseController* controller = [controller_ avatarButtonController];
798 NSView* anchor = [controller buttonView]; 798 NSView* anchor = [controller buttonView];
799 if ([anchor isHiddenOrHasHiddenAncestor]) 799 if ([anchor isHiddenOrHasHiddenAncestor])
800 anchor = [[controller_ toolbarController] wrenchButton]; 800 anchor = [[controller_ toolbarController] wrenchButton];
801 [controller showAvatarBubbleAnchoredAt:anchor 801 [controller showAvatarBubbleAnchoredAt:anchor
802 withMode:mode 802 withMode:mode
803 withServiceType:manage_accounts_params.service_type]; 803 withServiceType:manage_accounts_params.service_type];
804 } 804 }
805 805
806 void BrowserWindowCocoa::CloseAvatarBubbleFromAvatarButton() {
807 [[controller_ avatarButtonController] closeAvatarBubble];
808 }
809
810 int 806 int
811 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() { 807 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() {
812 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) 808 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED)
813 return 0; 809 return 0;
814 return 40; 810 return 40;
815 } 811 }
816 812
817 void BrowserWindowCocoa::ExecuteExtensionCommand( 813 void BrowserWindowCocoa::ExecuteExtensionCommand(
818 const extensions::Extension* extension, 814 const extensions::Extension* extension,
819 const extensions::Command& command) { 815 const extensions::Command& command) {
(...skipping 15 matching lines...) Expand all
835 void BrowserWindowCocoa::UnhideDownloadShelf() { 831 void BrowserWindowCocoa::UnhideDownloadShelf() {
836 GetDownloadShelf()->Unhide(); 832 GetDownloadShelf()->Unhide();
837 } 833 }
838 834
839 void BrowserWindowCocoa::HideDownloadShelf() { 835 void BrowserWindowCocoa::HideDownloadShelf() {
840 GetDownloadShelf()->Hide(); 836 GetDownloadShelf()->Hide();
841 StatusBubble* statusBubble = GetStatusBubble(); 837 StatusBubble* statusBubble = GetStatusBubble();
842 if (statusBubble) 838 if (statusBubble)
843 statusBubble->Hide(); 839 statusBubble->Hide();
844 } 840 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.h ('k') | chrome/browser/ui/cocoa/profiles/avatar_base_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698