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

Side by Side Diff: ash/system/user/tray_user.cc

Issue 11415014: Stop using shell::GetInstance()->system_tray() in system tray items (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix single-letter typo :(. Created 8 years, 1 month 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
« no previous file with comments | « ash/system/user/tray_user.h ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "ash/system/user/tray_user.h" 5 #include "ash/system/user/tray_user.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/system/tray/system_tray_delegate.h" 8 #include "ash/system/tray/system_tray_delegate.h"
9 #include "ash/system/tray/tray_constants.h" 9 #include "ash/system/tray/tray_constants.h"
10 #include "ash/system/tray/tray_item_view.h" 10 #include "ash/system/tray/tray_item_view.h"
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 views::Label* username_; 232 views::Label* username_;
233 views::Label* email_; 233 views::Label* email_;
234 234
235 views::Button* signout_; 235 views::Button* signout_;
236 236
237 DISALLOW_COPY_AND_ASSIGN(UserView); 237 DISALLOW_COPY_AND_ASSIGN(UserView);
238 }; 238 };
239 239
240 } // namespace tray 240 } // namespace tray
241 241
242 TrayUser::TrayUser() 242 TrayUser::TrayUser(SystemTray* system_tray)
243 : user_(NULL), 243 : SystemTrayItem(system_tray),
244 user_(NULL),
244 avatar_(NULL), 245 avatar_(NULL),
245 label_(NULL) { 246 label_(NULL) {
246 } 247 }
247 248
248 TrayUser::~TrayUser() { 249 TrayUser::~TrayUser() {
249 } 250 }
250 251
251 views::View* TrayUser::CreateTrayView(user::LoginStatus status) { 252 views::View* TrayUser::CreateTrayView(user::LoginStatus status) {
252 CHECK(avatar_ == NULL); 253 CHECK(avatar_ == NULL);
253 CHECK(label_ == NULL); 254 CHECK(label_ == NULL);
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Check for null to avoid crbug.com/150944. 341 // Check for null to avoid crbug.com/150944.
341 if (avatar_) { 342 if (avatar_) {
342 avatar_->SetImage( 343 avatar_->SetImage(
343 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), 344 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(),
344 gfx::Size(kUserIconSize, kUserIconSize)); 345 gfx::Size(kUserIconSize, kUserIconSize));
345 } 346 }
346 } 347 }
347 348
348 } // namespace internal 349 } // namespace internal
349 } // namespace ash 350 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/user/tray_user.h ('k') | ash/wm/shelf_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698