OLD | NEW |
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 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h" | 5 #import "chrome/browser/ui/cocoa/browser/avatar_button_controller.h" |
6 | 6 |
7 #include "base/sys_string_conversions.h" | 7 #include "base/sys_string_conversions.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/browser_process.h" | 9 #include "chrome/browser/browser_process.h" |
10 #include "chrome/browser/command_updater.h" | 10 #include "chrome/browser/command_updater.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 // Declare a 10.7+ private API. | 42 // Declare a 10.7+ private API. |
43 // NSThemeFrame < NSTitledFrame < NSFrameView < NSView. | 43 // NSThemeFrame < NSTitledFrame < NSFrameView < NSView. |
44 @interface NSView (NSThemeFrame) | 44 @interface NSView (NSThemeFrame) |
45 - (void)_tileTitlebarAndRedisplay:(BOOL)redisplay; | 45 - (void)_tileTitlebarAndRedisplay:(BOOL)redisplay; |
46 @end | 46 @end |
47 | 47 |
48 namespace AvatarButtonControllerInternal { | 48 namespace AvatarButtonControllerInternal { |
49 | 49 |
50 class Observer : public content::NotificationObserver { | 50 class Observer : public content::NotificationObserver { |
51 public: | 51 public: |
52 Observer(AvatarButtonController* button) : button_(button) { | 52 explicit Observer(AvatarButtonController* button) : button_(button) { |
53 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, | 53 registrar_.Add(this, chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED, |
54 content::NotificationService::AllSources()); | 54 content::NotificationService::AllSources()); |
55 } | 55 } |
56 | 56 |
57 // NotificationObserver: | 57 // NotificationObserver: |
58 virtual void Observe(int type, | 58 virtual void Observe(int type, |
59 const content::NotificationSource& source, | 59 const content::NotificationSource& source, |
60 const content::NotificationDetails& details) OVERRIDE { | 60 const content::NotificationDetails& details) OVERRIDE { |
61 switch (type) { | 61 switch (type) { |
62 case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED: | 62 case chrome::NOTIFICATION_PROFILE_CACHED_INFO_CHANGED: |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 [themeFrame _tileTitlebarAndRedisplay:YES]; | 303 [themeFrame _tileTitlebarAndRedisplay:YES]; |
304 } | 304 } |
305 | 305 |
306 // Testing ///////////////////////////////////////////////////////////////////// | 306 // Testing ///////////////////////////////////////////////////////////////////// |
307 | 307 |
308 - (AvatarMenuBubbleController*)menuController { | 308 - (AvatarMenuBubbleController*)menuController { |
309 return menuController_; | 309 return menuController_; |
310 } | 310 } |
311 | 311 |
312 @end | 312 @end |
OLD | NEW |