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 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H_ | 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "views/controls/button/text_button.h" | 9 #include "views/controls/button/text_button.h" |
10 | 10 |
11 namespace chromeos { | 11 namespace chromeos { |
12 | 12 |
13 class ShutdownButton : public views::TextButton, | 13 class ShutdownButton : public views::TextButton, |
14 public views::ButtonListener { | 14 public views::ButtonListener { |
15 public: | 15 public: |
16 ShutdownButton(); | 16 ShutdownButton(); |
17 | 17 |
18 // Initializes shutdown button. | 18 // Initializes shutdown button. |
19 void Init(); | 19 void Init(); |
20 | 20 |
21 // Layout the shutdown button at the right bottom corner of | 21 // Layout the shutdown button at the right bottom corner of |
22 // |parent|. | 22 // |parent|. |
23 void LayoutIn(views::View* parent); | 23 void LayoutIn(views::View* parent); |
24 | 24 |
25 private: | 25 private: |
26 // views::View overrides. | 26 // views::View overrides. |
27 virtual void OnLocaleChanged(); | 27 virtual void OnLocaleChanged() OVERRIDE; |
28 virtual gfx::NativeCursor GetCursorForPoint( | 28 virtual gfx::NativeCursor GetCursorForPoint(ui::EventType event_type, |
29 ui::EventType event_type, | 29 const gfx::Point& p) OVERRIDE; |
30 const gfx::Point& p); | |
31 | 30 |
32 // views::ButtonListener implementation. | 31 // views::ButtonListener implementation. |
33 virtual void ButtonPressed(views::Button* sender, const views::Event& event); | 32 virtual void ButtonPressed(views::Button* sender, |
| 33 const views::Event& event) OVERRIDE; |
34 | 34 |
35 DISALLOW_COPY_AND_ASSIGN(ShutdownButton); | 35 DISALLOW_COPY_AND_ASSIGN(ShutdownButton); |
36 }; | 36 }; |
37 | 37 |
38 } // namespace chromeos | 38 } // namespace chromeos |
39 | 39 |
40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H | 40 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_SHUTDOWN_BUTTON_H_ |
OLD | NEW |