OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/status/power_menu_button.h" | 5 #include "chrome/browser/chromeos/status/power_menu_button.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
| 11 #include "base/utf_string_conversions.h" |
11 #include "chrome/browser/chromeos/cros/cros_library.h" | 12 #include "chrome/browser/chromeos/cros/cros_library.h" |
12 #include "gfx/canvas.h" | 13 #include "gfx/canvas.h" |
13 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
14 #include "grit/theme_resources.h" | 15 #include "grit/theme_resources.h" |
15 | 16 |
16 namespace chromeos { | 17 namespace chromeos { |
17 | 18 |
18 //////////////////////////////////////////////////////////////////////////////// | 19 //////////////////////////////////////////////////////////////////////////////// |
19 // PowerMenuButton | 20 // PowerMenuButton |
20 | 21 |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 index = std::max(std::min(index, kNumPowerImages - 1), 0); | 172 index = std::max(std::min(index, kNumPowerImages - 1), 0); |
172 icon_id_ = cros->line_power_on() ? | 173 icon_id_ = cros->line_power_on() ? |
173 kChargingImages[index] : kDischargingImages[index]; | 174 kChargingImages[index] : kDischargingImages[index]; |
174 } | 175 } |
175 } | 176 } |
176 SetIcon(*ResourceBundle::GetSharedInstance().GetBitmapNamed(icon_id_)); | 177 SetIcon(*ResourceBundle::GetSharedInstance().GetBitmapNamed(icon_id_)); |
177 SchedulePaint(); | 178 SchedulePaint(); |
178 } | 179 } |
179 | 180 |
180 } // namespace chromeos | 181 } // namespace chromeos |
OLD | NEW |