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 ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ | 5 #ifndef ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ |
6 #define ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ | 6 #define ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/views/controls/button/image_button.h" | 9 #include "ui/views/controls/button/image_button.h" |
10 | 10 |
11 namespace aura_shell { | 11 namespace ash { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 class LauncherButtonHost; | 14 class LauncherButtonHost; |
15 | 15 |
16 // Button used for items on the launcher corresponding to an app window. | 16 // Button used for items on the launcher corresponding to an app window. |
17 class AppLauncherButton : public views::ImageButton { | 17 class AppLauncherButton : public views::ImageButton { |
18 public: | 18 public: |
19 AppLauncherButton(views::ButtonListener* listener, | 19 AppLauncherButton(views::ButtonListener* listener, |
20 LauncherButtonHost* host); | 20 LauncherButtonHost* host); |
21 virtual ~AppLauncherButton(); | 21 virtual ~AppLauncherButton(); |
22 | 22 |
23 // Sets the image to display for this entry. | 23 // Sets the image to display for this entry. |
24 void SetAppImage(const SkBitmap& image); | 24 void SetAppImage(const SkBitmap& image); |
25 | 25 |
26 protected: | 26 protected: |
27 // View overrides: | 27 // View overrides: |
28 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; | 28 virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE; |
29 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; | 29 virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE; |
30 virtual void OnMouseCaptureLost() OVERRIDE; | 30 virtual void OnMouseCaptureLost() OVERRIDE; |
31 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; | 31 virtual bool OnMouseDragged(const views::MouseEvent& event) OVERRIDE; |
32 | 32 |
33 private: | 33 private: |
34 LauncherButtonHost* host_; | 34 LauncherButtonHost* host_; |
35 | 35 |
36 DISALLOW_COPY_AND_ASSIGN(AppLauncherButton); | 36 DISALLOW_COPY_AND_ASSIGN(AppLauncherButton); |
37 }; | 37 }; |
38 | 38 |
39 } // namespace internal | 39 } // namespace internal |
40 } // namespace aura_shell | 40 } // namespace ash |
41 | 41 |
42 #endif // ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ | 42 #endif // ASH_LAUNCHER_APP_LAUNCHER_BUTTON_H_ |
OLD | NEW |