OLD | NEW |
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/login/shutdown_button.h" | 5 #include "chrome/browser/chromeos/login/shutdown_button.h" |
6 | 6 |
7 #include "base/utf_string_conversions.h" | 7 #include "base/utf_string_conversions.h" |
8 #include "chrome/browser/chromeos/cros/cros_library.h" | 8 #include "chrome/browser/chromeos/cros/cros_library.h" |
9 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" | 9 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
10 #include "chrome/browser/chromeos/dbus/power_manager_client.h" | 10 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
11 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 11 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
12 #include "chrome/browser/chromeos/view_ids.h" | 12 #include "chrome/browser/chromeos/view_ids.h" |
13 #include "grit/generated_resources.h" | 13 #include "grit/generated_resources.h" |
14 #include "grit/theme_resources.h" | 14 #include "grit/theme_resources.h" |
15 #include "ui/base/l10n/l10n_util.h" | 15 #include "ui/base/l10n/l10n_util.h" |
16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
17 #include "ui/gfx/gtk_util.h" | 17 #include "ui/gfx/gtk_util.h" |
18 #include "views/background.h" | 18 #include "ui/views/background.h" |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Style parameters for Shutdown button. | 22 // Style parameters for Shutdown button. |
23 | 23 |
24 // Top/Left padding to locale the shutdown button. | 24 // Top/Left padding to locale the shutdown button. |
25 const int kTopPadding = 0; | 25 const int kTopPadding = 0; |
26 const int kLeftPadding = 0; | 26 const int kLeftPadding = 0; |
27 | 27 |
28 // Normal/Hover colors. | 28 // Normal/Hover colors. |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 parent()->SchedulePaint(); | 112 parent()->SchedulePaint(); |
113 } | 113 } |
114 } | 114 } |
115 | 115 |
116 void ShutdownButton::ButtonPressed(views::Button* sender, | 116 void ShutdownButton::ButtonPressed(views::Button* sender, |
117 const views::Event& event) { | 117 const views::Event& event) { |
118 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); | 118 DBusThreadManager::Get()->GetPowerManagerClient()->RequestShutdown(); |
119 } | 119 } |
120 | 120 |
121 } // namespace chromeos | 121 } // namespace chromeos |
OLD | NEW |