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

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

Issue 1136693002: Chrome user menu shouldn't close if a tab steals focus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Michael's nit comments Created 5 years, 7 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
806 int 810 int
807 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() { 811 BrowserWindowCocoa::GetRenderViewHeightInsetWithDetachedBookmarkBar() {
808 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED) 812 if (browser_->bookmark_bar_state() != BookmarkBar::DETACHED)
809 return 0; 813 return 0;
810 return 40; 814 return 40;
811 } 815 }
812 816
813 void BrowserWindowCocoa::ExecuteExtensionCommand( 817 void BrowserWindowCocoa::ExecuteExtensionCommand(
814 const extensions::Extension* extension, 818 const extensions::Extension* extension,
815 const extensions::Command& command) { 819 const extensions::Command& command) {
(...skipping 15 matching lines...) Expand all
831 void BrowserWindowCocoa::UnhideDownloadShelf() { 835 void BrowserWindowCocoa::UnhideDownloadShelf() {
832 GetDownloadShelf()->Unhide(); 836 GetDownloadShelf()->Unhide();
833 } 837 }
834 838
835 void BrowserWindowCocoa::HideDownloadShelf() { 839 void BrowserWindowCocoa::HideDownloadShelf() {
836 GetDownloadShelf()->Hide(); 840 GetDownloadShelf()->Hide();
837 StatusBubble* statusBubble = GetStatusBubble(); 841 StatusBubble* statusBubble = GetStatusBubble();
838 if (statusBubble) 842 if (statusBubble)
839 statusBubble->Hide(); 843 statusBubble->Hide();
840 } 844 }
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