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/system_tray_item.h" | 5 #include "ash/system/tray/system_tray_item.h" |
6 | 6 |
7 #include "ash/shell.h" | |
8 #include "ash/system/tray/system_tray.h" | 7 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/tray_constants.h" | |
10 #include "ash/system/tray/tray_item_view.h" | |
11 #include "ui/views/controls/label.h" | |
12 #include "ui/views/view.h" | 8 #include "ui/views/view.h" |
13 | 9 |
14 namespace ash { | 10 namespace ash { |
15 | 11 |
16 SystemTrayItem::SystemTrayItem() { | 12 SystemTrayItem::SystemTrayItem(SystemTray* system_tray) |
| 13 : system_tray_(system_tray) { |
17 } | 14 } |
18 | 15 |
19 SystemTrayItem::~SystemTrayItem() { | 16 SystemTrayItem::~SystemTrayItem() { |
20 } | 17 } |
21 | 18 |
22 views::View* SystemTrayItem::CreateTrayView(user::LoginStatus status) { | 19 views::View* SystemTrayItem::CreateTrayView(user::LoginStatus status) { |
23 return NULL; | 20 return NULL; |
24 } | 21 } |
25 | 22 |
26 views::View* SystemTrayItem::CreateDefaultView(user::LoginStatus status) { | 23 views::View* SystemTrayItem::CreateDefaultView(user::LoginStatus status) { |
(...skipping 14 matching lines...) Expand all Loading... |
41 void SystemTrayItem::DestroyDefaultView() { | 38 void SystemTrayItem::DestroyDefaultView() { |
42 } | 39 } |
43 | 40 |
44 void SystemTrayItem::DestroyDetailedView() { | 41 void SystemTrayItem::DestroyDetailedView() { |
45 } | 42 } |
46 | 43 |
47 void SystemTrayItem::DestroyNotificationView() { | 44 void SystemTrayItem::DestroyNotificationView() { |
48 } | 45 } |
49 | 46 |
50 void SystemTrayItem::TransitionDetailedView() { | 47 void SystemTrayItem::TransitionDetailedView() { |
51 Shell::GetInstance()->system_tray()->ShowDetailedView(this, 0, true, | 48 system_tray()->ShowDetailedView(this, 0, true, BUBBLE_USE_EXISTING); |
52 BUBBLE_USE_EXISTING); | |
53 } | 49 } |
54 | 50 |
55 void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { | 51 void SystemTrayItem::UpdateAfterLoginStatusChange(user::LoginStatus status) { |
56 } | 52 } |
57 | 53 |
58 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { | 54 void SystemTrayItem::UpdateAfterShelfAlignmentChange(ShelfAlignment alignment) { |
59 } | 55 } |
60 | 56 |
61 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) { | 57 void SystemTrayItem::PopupDetailedView(int for_seconds, bool activate) { |
62 Shell::GetInstance()->system_tray()->ShowDetailedView( | 58 system_tray()->ShowDetailedView( |
63 this, for_seconds, activate, BUBBLE_CREATE_NEW); | 59 this, for_seconds, activate, BUBBLE_CREATE_NEW); |
64 } | 60 } |
65 | 61 |
66 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) { | 62 void SystemTrayItem::SetDetailedViewCloseDelay(int for_seconds) { |
67 Shell::GetInstance()->system_tray()->SetDetailedViewCloseDelay(for_seconds); | 63 system_tray()->SetDetailedViewCloseDelay(for_seconds); |
68 } | 64 } |
69 | 65 |
70 void SystemTrayItem::HideDetailedView() { | 66 void SystemTrayItem::HideDetailedView() { |
71 Shell::GetInstance()->system_tray()->HideDetailedView(this); | 67 system_tray()->HideDetailedView(this); |
72 } | 68 } |
73 | 69 |
74 void SystemTrayItem::ShowNotificationView() { | 70 void SystemTrayItem::ShowNotificationView() { |
75 Shell::GetInstance()->system_tray()->ShowNotificationView(this); | 71 system_tray()->ShowNotificationView(this); |
76 } | 72 } |
77 | 73 |
78 void SystemTrayItem::HideNotificationView() { | 74 void SystemTrayItem::HideNotificationView() { |
79 Shell::GetInstance()->system_tray()->HideNotificationView(this); | 75 system_tray()->HideNotificationView(this); |
80 } | 76 } |
81 | 77 |
82 bool SystemTrayItem::ShouldShowLauncher() const { | 78 bool SystemTrayItem::ShouldShowLauncher() const { |
83 return true; | 79 return true; |
84 } | 80 } |
85 | 81 |
86 } // namespace ash | 82 } // namespace ash |
OLD | NEW |