| 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/power/tray_power.h" | 5 #include "ash/system/power/tray_power.h" |
| 6 | 6 |
| 7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/system/date/date_view.h" | 9 #include "ash/system/date/date_view.h" |
| 10 #include "ash/system/power/power_status_view.h" | 10 #include "ash/system/power/power_status_view.h" |
| 11 #include "ash/system/power/power_supply_status.h" | 11 #include "ash/system/power/power_supply_status.h" |
| 12 #include "ash/system/tray/system_tray_delegate.h" | 12 #include "ash/system/tray/system_tray_delegate.h" |
| 13 #include "ash/system/tray/system_tray_notifier.h" | 13 #include "ash/system/tray/system_tray_notifier.h" |
| 14 #include "ash/system/tray/tray_constants.h" | 14 #include "ash/system/tray/tray_constants.h" |
| 15 #include "ash/system/tray/tray_notification_view.h" | 15 #include "ash/system/tray/tray_notification_view.h" |
| 16 #include "ash/system/tray/tray_views.h" | 16 #include "ash/system/tray/tray_views.h" |
| 17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
| 18 #include "base/string_number_conversions.h" | 18 #include "base/string_number_conversions.h" |
| 19 #include "base/stringprintf.h" | 19 #include "base/stringprintf.h" |
| 20 #include "base/utf_string_conversions.h" | 20 #include "base/utf_string_conversions.h" |
| 21 #include "grit/ash_resources.h" | 21 #include "grit/ash_resources.h" |
| 22 #include "grit/ash_strings.h" | 22 #include "grit/ash_strings.h" |
| 23 #include "third_party/icu/public/i18n/unicode/fieldpos.h" |
| 24 #include "third_party/icu/public/i18n/unicode/fmtable.h" |
| 23 #include "third_party/skia/include/core/SkRect.h" | 25 #include "third_party/skia/include/core/SkRect.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 25 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
| 26 #include "ui/gfx/image/image.h" | 28 #include "ui/gfx/image/image.h" |
| 27 #include "ui/gfx/image/image_skia.h" | 29 #include "ui/gfx/image/image_skia.h" |
| 28 #include "ui/gfx/image/image_skia_operations.h" | 30 #include "ui/gfx/image/image_skia_operations.h" |
| 29 #include "ui/gfx/size.h" | 31 #include "ui/gfx/size.h" |
| 30 #include "ui/views/controls/button/button.h" | 32 #include "ui/views/controls/button/button.h" |
| 31 #include "ui/views/controls/button/text_button.h" | 33 #include "ui/views/controls/button/text_button.h" |
| 32 #include "ui/views/controls/image_view.h" | 34 #include "ui/views/controls/image_view.h" |
| 33 #include "ui/views/controls/label.h" | 35 #include "ui/views/controls/label.h" |
| 34 #include "ui/views/layout/box_layout.h" | 36 #include "ui/views/layout/box_layout.h" |
| 35 #include "ui/views/layout/fill_layout.h" | 37 #include "ui/views/layout/fill_layout.h" |
| 36 #include "ui/views/layout/grid_layout.h" | 38 #include "ui/views/layout/grid_layout.h" |
| 37 #include "ui/views/view.h" | 39 #include "ui/views/view.h" |
| 38 #include "ui/views/widget/widget.h" | 40 #include "ui/views/widget/widget.h" |
| 39 #include "unicode/fieldpos.h" | |
| 40 #include "unicode/fmtable.h" | |
| 41 | 41 |
| 42 namespace ash { | 42 namespace ash { |
| 43 namespace internal { | 43 namespace internal { |
| 44 | 44 |
| 45 namespace { | 45 namespace { |
| 46 // Width and height of battery images. | 46 // Width and height of battery images. |
| 47 const int kBatteryImageHeight = 25; | 47 const int kBatteryImageHeight = 25; |
| 48 const int kBatteryImageWidth = 25; | 48 const int kBatteryImageWidth = 25; |
| 49 // Number of different power states. | 49 // Number of different power states. |
| 50 const int kNumPowerImages = 15; | 50 const int kNumPowerImages = 15; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 return false; | 269 return false; |
| 270 case NOTIFICATION_CRITICAL: | 270 case NOTIFICATION_CRITICAL: |
| 271 return false; | 271 return false; |
| 272 } | 272 } |
| 273 NOTREACHED(); | 273 NOTREACHED(); |
| 274 return false; | 274 return false; |
| 275 } | 275 } |
| 276 | 276 |
| 277 } // namespace internal | 277 } // namespace internal |
| 278 } // namespace ash | 278 } // namespace ash |
| OLD | NEW |