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/avatar_base_controller.h" | 5 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h" |
6 | 6 |
7 #include "base/mac/foundation_util.h" | 7 #include "base/mac/foundation_util.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/profiles/profile_info_cache_observer.h" | 10 #include "chrome/browser/profiles/profile_info_cache_observer.h" |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; | 86 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; |
87 } | 87 } |
88 | 88 |
89 void OnProfileNameChanged(const base::FilePath& profile_path, | 89 void OnProfileNameChanged(const base::FilePath& profile_path, |
90 const base::string16& old_profile_name) override { | 90 const base::string16& old_profile_name) override { |
91 if (profile_->GetPath() == profile_path) | 91 if (profile_->GetPath() == profile_path) |
92 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; | 92 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; |
93 } | 93 } |
94 | 94 |
95 void OnProfileAvatarChanged(const base::FilePath& profile_path) override { | 95 void OnProfileAvatarChanged(const base::FilePath& profile_path) override { |
96 if (profile_->GetPath() == profile_path) | 96 if (!switches::IsNewAvatarMenu() && profile_->GetPath() == profile_path) |
97 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; | 97 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; |
98 } | 98 } |
99 | 99 |
100 void OnProfileSupervisedUserIdChanged( | 100 void OnProfileSupervisedUserIdChanged( |
101 const base::FilePath& profile_path) override { | 101 const base::FilePath& profile_path) override { |
102 if (profile_->GetPath() == profile_path) | 102 if (profile_->GetPath() == profile_path) |
103 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; | 103 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; |
104 } | 104 } |
105 | 105 |
106 // SigninErrorController::Observer: | 106 // SigninErrorController::Observer: |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 } | 230 } |
231 | 231 |
232 - (void)updateErrorStatus:(BOOL)hasError { | 232 - (void)updateErrorStatus:(BOOL)hasError { |
233 } | 233 } |
234 | 234 |
235 - (BaseBubbleController*)menuController { | 235 - (BaseBubbleController*)menuController { |
236 return menuController_; | 236 return menuController_; |
237 } | 237 } |
238 | 238 |
239 @end | 239 @end |
OLD | NEW |