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

Side by Side Diff: chrome/browser/ui/cocoa/profiles/profile_chooser_controller.mm

Issue 640593006: Revert of [Mac] Enter should trigger the buttons in the new avatar bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #import <Cocoa/Cocoa.h> 5 #import <Cocoa/Cocoa.h>
6 6
7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h" 7 #import "chrome/browser/ui/cocoa/profiles/profile_chooser_controller.h"
8 8
9 #include "base/mac/bundle_locations.h" 9 #include "base/mac/bundle_locations.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 18 matching lines...) Expand all
29 #include "chrome/browser/signin/signin_manager_factory.h" 29 #include "chrome/browser/signin/signin_manager_factory.h"
30 #include "chrome/browser/signin/signin_promo.h" 30 #include "chrome/browser/signin/signin_promo.h"
31 #include "chrome/browser/signin/signin_ui_util.h" 31 #include "chrome/browser/signin/signin_ui_util.h"
32 #include "chrome/browser/ui/browser.h" 32 #include "chrome/browser/ui/browser.h"
33 #include "chrome/browser/ui/browser_commands.h" 33 #include "chrome/browser/ui/browser_commands.h"
34 #include "chrome/browser/ui/browser_window.h" 34 #include "chrome/browser/ui/browser_window.h"
35 #include "chrome/browser/ui/chrome_pages.h" 35 #include "chrome/browser/ui/chrome_pages.h"
36 #include "chrome/browser/ui/chrome_style.h" 36 #include "chrome/browser/ui/chrome_style.h"
37 #import "chrome/browser/ui/cocoa/info_bubble_view.h" 37 #import "chrome/browser/ui/cocoa/info_bubble_view.h"
38 #import "chrome/browser/ui/cocoa/info_bubble_window.h" 38 #import "chrome/browser/ui/cocoa/info_bubble_window.h"
39 #import "chrome/browser/ui/cocoa/key_equivalent_constants.h"
40 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h" 39 #import "chrome/browser/ui/cocoa/profiles/user_manager_mac.h"
41 #include "chrome/browser/ui/singleton_tabs.h" 40 #include "chrome/browser/ui/singleton_tabs.h"
42 #include "chrome/browser/ui/user_manager.h" 41 #include "chrome/browser/ui/user_manager.h"
43 #include "chrome/browser/ui/webui/signin/login_ui_service.h" 42 #include "chrome/browser/ui/webui/signin/login_ui_service.h"
44 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h" 43 #include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
45 #include "chrome/common/pref_names.h" 44 #include "chrome/common/pref_names.h"
46 #include "chrome/common/url_constants.h" 45 #include "chrome/common/url_constants.h"
47 #include "chrome/grit/chromium_strings.h" 46 #include "chrome/grit/chromium_strings.h"
48 #include "chrome/grit/generated_resources.h" 47 #include "chrome/grit/generated_resources.h"
49 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h" 48 #include "components/signin/core/browser/mutable_profile_oauth2_token_service.h"
(...skipping 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2094 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance(); 2093 ui::ResourceBundle* rb = &ui::ResourceBundle::GetSharedInstance();
2095 NSImage* image = rb->GetNativeImageNamed(imageResourceId).ToNSImage(); 2094 NSImage* image = rb->GetNativeImageNamed(imageResourceId).ToNSImage();
2096 [button setDefaultImage:image]; 2095 [button setDefaultImage:image];
2097 [button setHoverImage:image]; 2096 [button setHoverImage:image];
2098 [button setPressedImage:image]; 2097 [button setPressedImage:image];
2099 [button setImagePosition:NSImageLeft]; 2098 [button setImagePosition:NSImageLeft];
2100 [button setAlignment:NSLeftTextAlignment]; 2099 [button setAlignment:NSLeftTextAlignment];
2101 [button setBordered:NO]; 2100 [button setBordered:NO];
2102 [button setTarget:self]; 2101 [button setTarget:self];
2103 [button setAction:action]; 2102 [button setAction:action];
2104 [button setKeyEquivalent:kKeyEquivalentReturn];
2105 2103
2106 return button.autorelease(); 2104 return button.autorelease();
2107 } 2105 }
2108 2106
2109 - (NSButton*)linkButtonWithTitle:(NSString*)title 2107 - (NSButton*)linkButtonWithTitle:(NSString*)title
2110 frameOrigin:(NSPoint)frameOrigin 2108 frameOrigin:(NSPoint)frameOrigin
2111 action:(SEL)action { 2109 action:(SEL)action {
2112 base::scoped_nsobject<NSButton> link( 2110 base::scoped_nsobject<NSButton> link(
2113 [[HyperlinkButtonCell buttonWithString:title] retain]); 2111 [[HyperlinkButtonCell buttonWithString:title] retain]);
2114 2112
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 } 2192 }
2195 2193
2196 - (bool)shouldShowGoIncognito { 2194 - (bool)shouldShowGoIncognito {
2197 bool incognitoAvailable = 2195 bool incognitoAvailable =
2198 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) != 2196 IncognitoModePrefs::GetAvailability(browser_->profile()->GetPrefs()) !=
2199 IncognitoModePrefs::DISABLED; 2197 IncognitoModePrefs::DISABLED;
2200 return incognitoAvailable && !browser_->profile()->IsGuestSession(); 2198 return incognitoAvailable && !browser_->profile()->IsGuestSession();
2201 } 2199 }
2202 2200
2203 @end 2201 @end
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698