OLD | NEW |
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/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/profiles/avatar_menu.h" | 10 #include "chrome/browser/profiles/avatar_menu.h" |
11 #include "chrome/browser/profiles/avatar_menu_observer.h" | 11 #include "chrome/browser/profiles/avatar_menu_observer.h" |
12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" | 13 #include "chrome/browser/profiles/profile_avatar_icon_util.h" |
14 #include "chrome/browser/profiles/profile_info_cache.h" | 14 #include "chrome/browser/profiles/profile_info_cache.h" |
15 #include "chrome/browser/profiles/profile_info_interface.h" | 15 #include "chrome/browser/profiles/profile_info_interface.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 16 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/profiles/profile_metrics.h" | 17 #include "chrome/browser/profiles/profile_metrics.h" |
18 #include "chrome/browser/ui/browser.h" | 18 #include "chrome/browser/ui/browser.h" |
19 #include "chrome/browser/ui/browser_list.h" | 19 #include "chrome/browser/ui/browser_list.h" |
20 #include "chrome/browser/ui/browser_list_observer.h" | 20 #include "chrome/browser/ui/browser_list_observer.h" |
21 #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h" | 21 #include "chrome/browser/ui/cocoa/last_active_browser_cocoa.h" |
| 22 #include "chrome/grit/generated_resources.h" |
22 #include "components/signin/core/common/profile_management_switches.h" | 23 #include "components/signin/core/common/profile_management_switches.h" |
23 #include "grit/generated_resources.h" | |
24 #include "ui/base/l10n/l10n_util_mac.h" | 24 #include "ui/base/l10n/l10n_util_mac.h" |
25 #include "ui/gfx/image/image.h" | 25 #include "ui/gfx/image/image.h" |
26 | 26 |
27 @interface ProfileMenuController (Private) | 27 @interface ProfileMenuController (Private) |
28 - (void)initializeMenu; | 28 - (void)initializeMenu; |
29 @end | 29 @end |
30 | 30 |
31 namespace ProfileMenuControllerInternal { | 31 namespace ProfileMenuControllerInternal { |
32 | 32 |
33 class Observer : public chrome::BrowserListObserver, | 33 class Observer : public chrome::BrowserListObserver, |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
259 } | 259 } |
260 | 260 |
261 - (NSMenuItem*)createItemWithTitle:(NSString*)title action:(SEL)sel { | 261 - (NSMenuItem*)createItemWithTitle:(NSString*)title action:(SEL)sel { |
262 base::scoped_nsobject<NSMenuItem> item( | 262 base::scoped_nsobject<NSMenuItem> item( |
263 [[NSMenuItem alloc] initWithTitle:title action:sel keyEquivalent:@""]); | 263 [[NSMenuItem alloc] initWithTitle:title action:sel keyEquivalent:@""]); |
264 [item setTarget:self]; | 264 [item setTarget:self]; |
265 return [item.release() autorelease]; | 265 return [item.release() autorelease]; |
266 } | 266 } |
267 | 267 |
268 @end | 268 @end |
OLD | NEW |