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

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

Issue 10827271: Replace views::Event with ui::Event. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
« no previous file with comments | « ash/system/tray_update.cc ('k') | ash/system/web_notification/web_notification_tray.h » ('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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 email_->SetFont(username_->font().DeriveFont(-1)); 180 email_->SetFont(username_->font().DeriveFont(-1));
181 email_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); 181 email_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
182 email_->SetEnabled(false); 182 email_->SetEnabled(false);
183 user->AddChildView(email_); 183 user->AddChildView(email_);
184 184
185 user_info_->AddChildView(user); 185 user_info_->AddChildView(user);
186 } 186 }
187 187
188 // Overridden from views::ButtonListener. 188 // Overridden from views::ButtonListener.
189 virtual void ButtonPressed(views::Button* sender, 189 virtual void ButtonPressed(views::Button* sender,
190 const views::Event& event) OVERRIDE { 190 const ui::Event& event) OVERRIDE {
191 CHECK(sender == signout_); 191 CHECK(sender == signout_);
192 ash::SystemTrayDelegate* tray = ash::Shell::GetInstance()->tray_delegate(); 192 ash::SystemTrayDelegate* tray = ash::Shell::GetInstance()->tray_delegate();
193 tray->SignOut(); 193 tray->SignOut();
194 } 194 }
195 195
196 // Overridden from views::View. 196 // Overridden from views::View.
197 virtual gfx::Size GetPreferredSize() OVERRIDE { 197 virtual gfx::Size GetPreferredSize() OVERRIDE {
198 gfx::Size size; 198 gfx::Size size;
199 if (user_info_) 199 if (user_info_)
200 size = user_info_->GetPreferredSize(); 200 size = user_info_->GetPreferredSize();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 301
302 void TrayUser::OnUserUpdate() { 302 void TrayUser::OnUserUpdate() {
303 avatar_->SetImage( 303 avatar_->SetImage(
304 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), 304 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(),
305 gfx::Size(kUserIconSize, kUserIconSize)); 305 gfx::Size(kUserIconSize, kUserIconSize));
306 } 306 }
307 307
308 } // namespace internal 308 } // namespace internal
309 } // namespace ash 309 } // namespace ash
OLDNEW
« no previous file with comments | « ash/system/tray_update.cc ('k') | ash/system/web_notification/web_notification_tray.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698