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/settings/tray_settings.h" | 5 #include "ash/system/settings/tray_settings.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/system/power/power_status_view.h" | 8 #include "ash/system/power/power_status_view.h" |
| 9 #include "ash/system/tray/system_tray.h" |
9 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
10 #include "ash/system/tray/tray_constants.h" | 11 #include "ash/system/tray/tray_constants.h" |
11 #include "ash/system/tray/tray_views.h" | 12 #include "ash/system/tray/tray_views.h" |
12 #include "base/logging.h" | 13 #include "base/logging.h" |
13 #include "base/utf_string_conversions.h" | 14 #include "base/utf_string_conversions.h" |
14 #include "grit/ash_resources.h" | 15 #include "grit/ash_resources.h" |
15 #include "grit/ash_strings.h" | 16 #include "grit/ash_strings.h" |
16 #include "third_party/skia/include/core/SkColor.h" | 17 #include "third_party/skia/include/core/SkColor.h" |
17 #include "ui/base/accessibility/accessible_view_state.h" | 18 #include "ui/base/accessibility/accessible_view_state.h" |
18 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 private: | 108 private: |
108 user::LoginStatus login_status_; | 109 user::LoginStatus login_status_; |
109 views::Label* label_; | 110 views::Label* label_; |
110 ash::internal::PowerStatusView* power_status_view_; | 111 ash::internal::PowerStatusView* power_status_view_; |
111 | 112 |
112 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); | 113 DISALLOW_COPY_AND_ASSIGN(SettingsDefaultView); |
113 }; | 114 }; |
114 | 115 |
115 } // namespace tray | 116 } // namespace tray |
116 | 117 |
117 TraySettings::TraySettings() | 118 TraySettings::TraySettings(SystemTray* system_tray) |
118 : default_view_(NULL) { | 119 : SystemTrayItem(system_tray), |
| 120 default_view_(NULL) { |
119 } | 121 } |
120 | 122 |
121 TraySettings::~TraySettings() {} | 123 TraySettings::~TraySettings() {} |
122 | 124 |
123 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { | 125 views::View* TraySettings::CreateTrayView(user::LoginStatus status) { |
124 return NULL; | 126 return NULL; |
125 } | 127 } |
126 | 128 |
127 views::View* TraySettings::CreateDefaultView(user::LoginStatus status) { | 129 views::View* TraySettings::CreateDefaultView(user::LoginStatus status) { |
128 if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) && | 130 if ((status == user::LOGGED_IN_NONE || status == user::LOGGED_IN_LOCKED) && |
(...skipping 25 matching lines...) Expand all Loading... |
154 } | 156 } |
155 | 157 |
156 // Overridden from PowerStatusObserver. | 158 // Overridden from PowerStatusObserver. |
157 void TraySettings::OnPowerStatusChanged(const PowerSupplyStatus& status) { | 159 void TraySettings::OnPowerStatusChanged(const PowerSupplyStatus& status) { |
158 if (default_view_) | 160 if (default_view_) |
159 default_view_->UpdatePowerStatus(status); | 161 default_view_->UpdatePowerStatus(status); |
160 } | 162 } |
161 | 163 |
162 } // namespace internal | 164 } // namespace internal |
163 } // namespace ash | 165 } // namespace ash |
OLD | NEW |