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

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

Issue 1336823003: Move chrome::HostDesktopType to ui::HostDesktopType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@base_session_service_delegate_impl
Patch Set: Fix build on Mac and CrOS Created 5 years, 3 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 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 "chrome/browser/ui/cocoa/profiles/profile_menu_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/profile_menu_controller.h"
6 6
7 #include "base/mac/scoped_nsobject.h" 7 #include "base/mac/scoped_nsobject.h"
8 #include "base/metrics/histogram_macros.h" 8 #include "base/metrics/histogram_macros.h"
9 #include "base/strings/sys_string_conversions.h" 9 #include "base/strings/sys_string_conversions.h"
10 #include "chrome/browser/browser_process.h" 10 #include "chrome/browser/browser_process.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 [NSApp activateIgnoringOtherApps:YES]; 107 [NSApp activateIgnoringOtherApps:YES];
108 avatarMenu_->SwitchToProfile([sender tag], false, 108 avatarMenu_->SwitchToProfile([sender tag], false,
109 ProfileMetrics::SWITCH_PROFILE_DOCK); 109 ProfileMetrics::SWITCH_PROFILE_DOCK);
110 } 110 }
111 111
112 - (IBAction)editProfile:(id)sender { 112 - (IBAction)editProfile:(id)sender {
113 avatarMenu_->EditProfile(avatarMenu_->GetActiveProfileIndex()); 113 avatarMenu_->EditProfile(avatarMenu_->GetActiveProfileIndex());
114 } 114 }
115 115
116 - (IBAction)newProfile:(id)sender { 116 - (IBAction)newProfile:(id)sender {
117 profiles::CreateAndSwitchToNewProfile(chrome::HOST_DESKTOP_TYPE_NATIVE, 117 profiles::CreateAndSwitchToNewProfile(ui::HOST_DESKTOP_TYPE_NATIVE,
118 ProfileManager::CreateCallback(), 118 ProfileManager::CreateCallback(),
119 ProfileMetrics::ADD_NEW_USER_MENU); 119 ProfileMetrics::ADD_NEW_USER_MENU);
120 } 120 }
121 121
122 - (BOOL)insertItemsIntoMenu:(NSMenu*)menu 122 - (BOOL)insertItemsIntoMenu:(NSMenu*)menu
123 atOffset:(NSInteger)offset 123 atOffset:(NSInteger)offset
124 fromDock:(BOOL)dock { 124 fromDock:(BOOL)dock {
125 if (!avatarMenu_ || !avatarMenu_->ShouldShowAvatarMenu()) 125 if (!avatarMenu_ || !avatarMenu_->ShouldShowAvatarMenu())
126 return NO; 126 return NO;
127 127
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 } 301 }
302 302
303 - (NSMenuItem*)createItemWithTitle:(NSString*)title action:(SEL)sel { 303 - (NSMenuItem*)createItemWithTitle:(NSString*)title action:(SEL)sel {
304 base::scoped_nsobject<NSMenuItem> item( 304 base::scoped_nsobject<NSMenuItem> item(
305 [[NSMenuItem alloc] initWithTitle:title action:sel keyEquivalent:@""]); 305 [[NSMenuItem alloc] initWithTitle:title action:sel keyEquivalent:@""]);
306 [item setTarget:self]; 306 [item setTarget:self];
307 return [item.release() autorelease]; 307 return [item.release() autorelease];
308 } 308 }
309 309
310 @end 310 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698