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/tray/tray_empty.h" | 5 #include "ash/system/tray/tray_empty.h" |
6 | 6 |
7 #include "ui/views/layout/box_layout.h" | 7 #include "ui/views/layout/box_layout.h" |
8 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
9 | 9 |
10 namespace ash { | 10 namespace ash { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 TrayEmpty::TrayEmpty() {} | 13 TrayEmpty::TrayEmpty() {} |
14 | 14 |
15 TrayEmpty::~TrayEmpty() {} | 15 TrayEmpty::~TrayEmpty() {} |
16 | 16 |
17 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) { | 17 views::View* TrayEmpty::CreateTrayView(user::LoginStatus status) { |
18 return NULL; | 18 return NULL; |
19 } | 19 } |
20 | 20 |
21 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) { | 21 views::View* TrayEmpty::CreateDefaultView(user::LoginStatus status) { |
| 22 if (status == user::LOGGED_IN_NONE) |
| 23 return NULL; |
| 24 |
22 views::View* view = new views::View; | 25 views::View* view = new views::View; |
23 | |
24 view->set_background(views::Background::CreateSolidBackground( | 26 view->set_background(views::Background::CreateSolidBackground( |
25 SkColorSetARGB(0, 0, 0, 0))); | 27 SkColorSetARGB(0, 0, 0, 0))); |
26 view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0)); | 28 view->set_border(views::Border::CreateEmptyBorder(10, 0, 0, 0)); |
27 view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, | 29 view->SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, |
28 0, 0, 0)); | 30 0, 0, 0)); |
29 | |
30 return view; | 31 return view; |
31 } | 32 } |
32 | 33 |
33 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) { | 34 views::View* TrayEmpty::CreateDetailedView(user::LoginStatus status) { |
34 return NULL; | 35 return NULL; |
35 } | 36 } |
36 | 37 |
37 void TrayEmpty::DestroyTrayView() {} | 38 void TrayEmpty::DestroyTrayView() {} |
38 | 39 |
39 void TrayEmpty::DestroyDefaultView() {} | 40 void TrayEmpty::DestroyDefaultView() {} |
40 | 41 |
41 void TrayEmpty::DestroyDetailedView() {} | 42 void TrayEmpty::DestroyDetailedView() {} |
42 | 43 |
43 } // namespace internal | 44 } // namespace internal |
44 } // namespace ash | 45 } // namespace ash |
OLD | NEW |