| 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 #ifndef ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ | 5 #ifndef ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ |
| 6 #define ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ | 6 #define ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ |
| 7 | 7 |
| 8 #include "ash/launcher/launcher_button.h" | 8 #include "ash/launcher/launcher_button.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/timer.h" | 10 #include "base/timer.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 class TabbedLauncherButton : public LauncherButton { | 30 class TabbedLauncherButton : public LauncherButton { |
| 31 public: | 31 public: |
| 32 // Indicates if this button is incognito or not. | 32 // Indicates if this button is incognito or not. |
| 33 enum IncognitoState { | 33 enum IncognitoState { |
| 34 STATE_INCOGNITO, | 34 STATE_INCOGNITO, |
| 35 STATE_NOT_INCOGNITO, | 35 STATE_NOT_INCOGNITO, |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 static TabbedLauncherButton* Create(views::ButtonListener* listener, | 38 static TabbedLauncherButton* Create(views::ButtonListener* listener, |
| 39 LauncherButtonHost* host, | 39 LauncherButtonHost* host, |
| 40 ShelfLayoutManager* shelf_layout_manager, |
| 40 IncognitoState is_incognito); | 41 IncognitoState is_incognito); |
| 41 virtual ~TabbedLauncherButton(); | 42 virtual ~TabbedLauncherButton(); |
| 42 | 43 |
| 43 // Sets the images to display for this entry. | 44 // Sets the images to display for this entry. |
| 44 void SetTabImage(const gfx::ImageSkia& image); | 45 void SetTabImage(const gfx::ImageSkia& image); |
| 45 | 46 |
| 46 // This only defines how the icon is drawn. Do not use it for other purposes. | 47 // This only defines how the icon is drawn. Do not use it for other purposes. |
| 47 IncognitoState is_incognito() const { return is_incognito_; } | 48 IncognitoState is_incognito() const { return is_incognito_; } |
| 48 | 49 |
| 49 protected: | 50 protected: |
| 50 TabbedLauncherButton(views::ButtonListener* listener, | 51 TabbedLauncherButton(views::ButtonListener* listener, |
| 51 LauncherButtonHost* host, | 52 LauncherButtonHost* host, |
| 53 ShelfLayoutManager* shelf_layout_manager, |
| 52 IncognitoState is_incognito); | 54 IncognitoState is_incognito); |
| 53 // View override. | 55 // View override. |
| 54 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; | 56 virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE; |
| 55 | 57 |
| 56 // LauncherButton override. | 58 // LauncherButton override. |
| 57 virtual IconView* CreateIconView() OVERRIDE; | 59 virtual IconView* CreateIconView() OVERRIDE; |
| 58 | 60 |
| 59 private: | 61 private: |
| 60 // Used as the delegate for |animation_|. | 62 // Used as the delegate for |animation_|. |
| 61 class IconView : public LauncherButton::IconView, | 63 class IconView : public LauncherButton::IconView, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // drawn. It does not necessarily indicate if the window is 'incognito'. | 103 // drawn. It does not necessarily indicate if the window is 'incognito'. |
| 102 const IncognitoState is_incognito_; | 104 const IncognitoState is_incognito_; |
| 103 | 105 |
| 104 DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton); | 106 DISALLOW_COPY_AND_ASSIGN(TabbedLauncherButton); |
| 105 }; | 107 }; |
| 106 | 108 |
| 107 } // namespace internal | 109 } // namespace internal |
| 108 } // namespace ash | 110 } // namespace ash |
| 109 | 111 |
| 110 #endif // ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ | 112 #endif // ASH_LAUNCHER_TABBED_LAUNCHER_BUTTON_H_ |
| OLD | NEW |