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 "chrome/browser/chromeos/status/power_menu_button.h" | 5 #include "chrome/browser/chromeos/status/power_menu_button.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
11 #include "base/stringprintf.h" | 11 #include "base/stringprintf.h" |
12 #include "base/time.h" | 12 #include "base/time.h" |
13 #include "base/utf_string_conversions.h" | 13 #include "base/utf_string_conversions.h" |
14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | |
15 #include "chrome/browser/chromeos/status/status_area_bubble.h" | 14 #include "chrome/browser/chromeos/status/status_area_bubble.h" |
16 #include "chrome/browser/chromeos/view_ids.h" | 15 #include "chrome/browser/chromeos/view_ids.h" |
| 16 #include "chromeos/dbus/dbus_thread_manager.h" |
17 #include "grit/generated_resources.h" | 17 #include "grit/generated_resources.h" |
18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
19 #include "ui/base/l10n/l10n_util.h" | 19 #include "ui/base/l10n/l10n_util.h" |
20 #include "ui/base/resource/resource_bundle.h" | 20 #include "ui/base/resource/resource_bundle.h" |
21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
22 #include "ui/gfx/font.h" | 22 #include "ui/gfx/font.h" |
23 #include "ui/gfx/image/image.h" | 23 #include "ui/gfx/image/image.h" |
24 #include "ui/views/controls/menu/menu_item_view.h" | 24 #include "ui/views/controls/menu/menu_item_view.h" |
25 #include "ui/views/controls/menu/menu_runner.h" | 25 #include "ui/views/controls/menu/menu_runner.h" |
26 #include "ui/views/controls/menu/submenu_view.h" | 26 #include "ui/views/controls/menu/submenu_view.h" |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 // If previous is 0, then it either was never set (initial condition) | 375 // If previous is 0, then it either was never set (initial condition) |
376 // or got down to 0. | 376 // or got down to 0. |
377 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) || | 377 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) || |
378 diff < kMinDiff || | 378 diff < kMinDiff || |
379 diff > kMaxDiff) { | 379 diff > kMaxDiff) { |
380 *previous = current; | 380 *previous = current; |
381 } | 381 } |
382 } | 382 } |
383 | 383 |
384 } // namespace chromeos | 384 } // namespace chromeos |
OLD | NEW |