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 #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.h" | |
msw
2012/11/16 20:09:04
nit: potentially not necessary; tray_user.h includ
bartfab (slow)
2012/11/19 17:15:31
system_tray_item.h has a forward declaration of th
oshima
2012/11/19 17:43:43
looks like it's not used in a way need definition?
bartfab (slow)
2012/11/19 18:00:31
Actually, you are right. I can remove the include
oshima
2012/11/19 21:14:17
If this will be necessary in next CL, please add i
bartfab (slow)
2012/11/19 22:32:25
Yes, of course. I addressed your comment and remov
oshima
2012/11/19 22:53:12
I understand, but we generally advise to add it wh
bartfab (slow)
2012/11/19 22:57:55
Absolutely. It was a mistake.
On 2012/11/19 22:53
| |
8 #include "ash/system/tray/system_tray_delegate.h" | 9 #include "ash/system/tray/system_tray_delegate.h" |
9 #include "ash/system/tray/tray_constants.h" | 10 #include "ash/system/tray/tray_constants.h" |
10 #include "ash/system/tray/tray_item_view.h" | 11 #include "ash/system/tray/tray_item_view.h" |
11 #include "ash/system/tray/tray_views.h" | 12 #include "ash/system/tray/tray_views.h" |
12 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
13 #include "grit/ash_strings.h" | 14 #include "grit/ash_strings.h" |
14 #include "skia/ext/image_operations.h" | 15 #include "skia/ext/image_operations.h" |
15 #include "third_party/skia/include/core/SkCanvas.h" | 16 #include "third_party/skia/include/core/SkCanvas.h" |
16 #include "third_party/skia/include/core/SkPaint.h" | 17 #include "third_party/skia/include/core/SkPaint.h" |
17 #include "third_party/skia/include/core/SkPath.h" | 18 #include "third_party/skia/include/core/SkPath.h" |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 views::Label* username_; | 240 views::Label* username_; |
240 views::Label* email_; | 241 views::Label* email_; |
241 | 242 |
242 views::Button* signout_; | 243 views::Button* signout_; |
243 | 244 |
244 DISALLOW_COPY_AND_ASSIGN(UserView); | 245 DISALLOW_COPY_AND_ASSIGN(UserView); |
245 }; | 246 }; |
246 | 247 |
247 } // namespace tray | 248 } // namespace tray |
248 | 249 |
249 TrayUser::TrayUser() | 250 TrayUser::TrayUser(SystemTray* system_tray) |
250 : user_(NULL), | 251 : SystemTrayItem(system_tray), |
252 user_(NULL), | |
251 avatar_(NULL), | 253 avatar_(NULL), |
252 label_(NULL) { | 254 label_(NULL) { |
253 } | 255 } |
254 | 256 |
255 TrayUser::~TrayUser() { | 257 TrayUser::~TrayUser() { |
256 } | 258 } |
257 | 259 |
258 views::View* TrayUser::CreateTrayView(user::LoginStatus status) { | 260 views::View* TrayUser::CreateTrayView(user::LoginStatus status) { |
259 CHECK(avatar_ == NULL); | 261 CHECK(avatar_ == NULL); |
260 CHECK(label_ == NULL); | 262 CHECK(label_ == NULL); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 // Check for null to avoid crbug.com/150944. | 349 // Check for null to avoid crbug.com/150944. |
348 if (avatar_) { | 350 if (avatar_) { |
349 avatar_->SetImage( | 351 avatar_->SetImage( |
350 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), | 352 ash::Shell::GetInstance()->tray_delegate()->GetUserImage(), |
351 gfx::Size(kUserIconSize, kUserIconSize)); | 353 gfx::Size(kUserIconSize, kUserIconSize)); |
352 } | 354 } |
353 } | 355 } |
354 | 356 |
355 } // namespace internal | 357 } // namespace internal |
356 } // namespace ash | 358 } // namespace ash |
OLD | NEW |