Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/chromeos/status/power_menu_button.cc

Issue 8547015: Revert 110949 - views: Move widget/ directory to ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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" 14 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h"
15 #include "chrome/browser/chromeos/status/status_area_bubble.h" 15 #include "chrome/browser/chromeos/status/status_area_bubble.h"
16 #include "chrome/browser/chromeos/view_ids.h" 16 #include "chrome/browser/chromeos/view_ids.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/canvas_skia.h" 22 #include "ui/gfx/canvas_skia.h"
23 #include "ui/gfx/font.h" 23 #include "ui/gfx/font.h"
24 #include "ui/gfx/image/image.h" 24 #include "ui/gfx/image/image.h"
25 #include "ui/views/widget/widget.h"
26 #include "views/controls/menu/menu_item_view.h" 25 #include "views/controls/menu/menu_item_view.h"
27 #include "views/controls/menu/menu_runner.h" 26 #include "views/controls/menu/menu_runner.h"
28 #include "views/controls/menu/submenu_view.h" 27 #include "views/controls/menu/submenu_view.h"
28 #include "views/widget/widget.h"
29 29
30 namespace { 30 namespace {
31 31
32 // Menu item ids. 32 // Menu item ids.
33 enum { 33 enum {
34 POWER_BATTERY_PERCENTAGE_ITEM = 1000, 34 POWER_BATTERY_PERCENTAGE_ITEM = 1000,
35 POWER_BATTERY_IS_CHARGED_ITEM, 35 POWER_BATTERY_IS_CHARGED_ITEM,
36 POWER_NO_BATTERY, 36 POWER_NO_BATTERY,
37 }; 37 };
38 38
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 // If previous is 0, then it either was never set (initial condition) 379 // If previous is 0, then it either was never set (initial condition)
380 // or got down to 0. 380 // or got down to 0.
381 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) || 381 if (*previous == TimeDelta::FromMicroseconds(kInitialMS) ||
382 diff < kMinDiff || 382 diff < kMinDiff ||
383 diff > kMaxDiff) { 383 diff > kMaxDiff) {
384 *previous = current; 384 *previous = current;
385 } 385 }
386 } 386 }
387 387
388 } // namespace chromeos 388 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/status/network_menu_button.cc ('k') | chrome/browser/download/download_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698