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

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

Issue 334283002: New avatar button: Update when the supervised user ID changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 6 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 | Annotate | Revision Log
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/avatar_base_controller.h" 5 #import "chrome/browser/ui/cocoa/profiles/avatar_base_controller.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/profiles/profile_info_cache_observer.h" 9 #include "chrome/browser/profiles/profile_info_cache_observer.h"
10 #include "chrome/browser/profiles/profile_avatar_icon_util.h" 10 #include "chrome/browser/profiles/profile_avatar_icon_util.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const base::FilePath& profile_path, 84 const base::FilePath& profile_path,
85 const base::string16& old_profile_name) OVERRIDE { 85 const base::string16& old_profile_name) OVERRIDE {
86 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 86 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
87 } 87 }
88 88
89 virtual void OnProfileAvatarChanged( 89 virtual void OnProfileAvatarChanged(
90 const base::FilePath& profile_path) OVERRIDE { 90 const base::FilePath& profile_path) OVERRIDE {
91 [avatarController_ updateAvatarButtonAndLayoutParent:YES]; 91 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
92 } 92 }
93 93
94 virtual void OnProfileSupervisedUserIdChanged(
95 const base::FilePath& profile_path) OVERRIDE {
96 [avatarController_ updateAvatarButtonAndLayoutParent:YES];
97 }
98
94 // SigninErrorController::Observer: 99 // SigninErrorController::Observer:
95 virtual void OnErrorChanged() OVERRIDE { 100 virtual void OnErrorChanged() OVERRIDE {
96 SigninErrorController* errorController = 101 SigninErrorController* errorController =
97 profiles::GetSigninErrorController(profile_); 102 profiles::GetSigninErrorController(profile_);
98 if (errorController) 103 if (errorController)
99 [avatarController_ updateErrorStatus:errorController->HasError()]; 104 [avatarController_ updateErrorStatus:errorController->HasError()];
100 } 105 }
101 106
102 private: 107 private:
103 Profile* profile_; 108 Profile* profile_;
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 } 208 }
204 209
205 - (void)updateErrorStatus:(BOOL)hasError { 210 - (void)updateErrorStatus:(BOOL)hasError {
206 } 211 }
207 212
208 - (BaseBubbleController*)menuController { 213 - (BaseBubbleController*)menuController {
209 return menuController_; 214 return menuController_;
210 } 215 }
211 216
212 @end 217 @end
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_info_cache_observer.h ('k') | chrome/browser/ui/views/profiles/new_avatar_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698