| 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_LAUNCHER_H_ | 5 #ifndef ASH_LAUNCHER_LAUNCHER_H_ |
| 6 #define ASH_LAUNCHER_LAUNCHER_H_ | 6 #define ASH_LAUNCHER_LAUNCHER_H_ |
| 7 | 7 |
| 8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
| 9 #include "ash/launcher/launcher_types.h" | 9 #include "ash/launcher/launcher_types.h" |
| 10 #include "ash/shelf/shelf_types.h" | 10 #include "ash/shelf/shelf_types.h" |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace ash { | 32 namespace ash { |
| 33 | 33 |
| 34 namespace internal { | 34 namespace internal { |
| 35 class FocusCycler; | 35 class FocusCycler; |
| 36 class LauncherView; | 36 class LauncherView; |
| 37 class ShelfLayoutManager; | 37 class ShelfLayoutManager; |
| 38 } | 38 } |
| 39 | 39 |
| 40 namespace test { |
| 41 class LauncherTestAPI; |
| 42 } |
| 43 |
| 40 class LauncherIconObserver; | 44 class LauncherIconObserver; |
| 41 class LauncherDelegate; | 45 class LauncherDelegate; |
| 42 class LauncherModel; | 46 class LauncherModel; |
| 43 class ShelfWidget; | 47 class ShelfWidget; |
| 44 | 48 |
| 45 class ASH_EXPORT Launcher { | 49 class ASH_EXPORT Launcher { |
| 46 public: | 50 public: |
| 47 static const char kNativeViewName[]; | 51 static const char kNativeViewName[]; |
| 48 | 52 |
| 49 Launcher(LauncherModel* launcher_model, | 53 Launcher(LauncherModel* launcher_model, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 bool IsVisible() const; | 94 bool IsVisible() const; |
| 91 | 95 |
| 92 void SchedulePaint(); | 96 void SchedulePaint(); |
| 93 | 97 |
| 94 views::View* GetAppListButtonView() const; | 98 views::View* GetAppListButtonView() const; |
| 95 | 99 |
| 96 // Launch a 0-indexed launcher item in the Launcher. | 100 // Launch a 0-indexed launcher item in the Launcher. |
| 97 // A negative index launches the last launcher item in the launcher. | 101 // A negative index launches the last launcher item in the launcher. |
| 98 void LaunchAppIndexAt(int item_index); | 102 void LaunchAppIndexAt(int item_index); |
| 99 | 103 |
| 100 // Only to be called for testing. Retrieves the LauncherView. | |
| 101 // TODO(sky): remove this! | |
| 102 internal::LauncherView* GetLauncherViewForTest(); | |
| 103 | |
| 104 ShelfWidget* shelf_widget() { return shelf_widget_; } | 104 ShelfWidget* shelf_widget() { return shelf_widget_; } |
| 105 | 105 |
| 106 // Set the bounds of the launcher view. | 106 // Set the bounds of the launcher view. |
| 107 void SetLauncherViewBounds(gfx::Rect bounds); | 107 void SetLauncherViewBounds(gfx::Rect bounds); |
| 108 gfx::Rect GetLauncherViewBounds() const; | 108 gfx::Rect GetLauncherViewBounds() const; |
| 109 | 109 |
| 110 // Returns ApplicationDragAndDropHost for this Launcher. | 110 // Returns ApplicationDragAndDropHost for this Launcher. |
| 111 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); | 111 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); |
| 112 | 112 |
| 113 private: | 113 private: |
| 114 friend class ash::test::LauncherTestAPI; |
| 115 |
| 114 // LauncherView used to display icons. | 116 // LauncherView used to display icons. |
| 115 internal::LauncherView* launcher_view_; | 117 internal::LauncherView* launcher_view_; |
| 116 | 118 |
| 117 ShelfAlignment alignment_; | 119 ShelfAlignment alignment_; |
| 118 | 120 |
| 119 LauncherDelegate* delegate_; | 121 LauncherDelegate* delegate_; |
| 120 | 122 |
| 121 ShelfWidget* shelf_widget_; | 123 ShelfWidget* shelf_widget_; |
| 122 | 124 |
| 123 DISALLOW_COPY_AND_ASSIGN(Launcher); | 125 DISALLOW_COPY_AND_ASSIGN(Launcher); |
| 124 }; | 126 }; |
| 125 | 127 |
| 126 } // namespace ash | 128 } // namespace ash |
| 127 | 129 |
| 128 #endif // ASH_LAUNCHER_LAUNCHER_H_ | 130 #endif // ASH_LAUNCHER_LAUNCHER_H_ |
| OLD | NEW |