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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 views::View* GetAppListButtonView() const; | 94 views::View* GetAppListButtonView() const; |
95 | 95 |
96 // Launch a 0-indexed launcher item in the Launcher. | 96 // Launch a 0-indexed launcher item in the Launcher. |
97 // A negative index launches the last launcher item in the launcher. | 97 // A negative index launches the last launcher item in the launcher. |
98 void LaunchAppIndexAt(int item_index); | 98 void LaunchAppIndexAt(int item_index); |
99 | 99 |
100 // Only to be called for testing. Retrieves the LauncherView. | 100 // Only to be called for testing. Retrieves the LauncherView. |
101 // TODO(sky): remove this! | 101 // TODO(sky): remove this! |
102 internal::LauncherView* GetLauncherViewForTest(); | 102 internal::LauncherView* GetLauncherViewForTest(); |
103 | 103 |
104 LauncherDelegate* delegate() { return delegate_; } | |
105 | |
106 ShelfWidget* shelf_widget() { return shelf_widget_; } | 104 ShelfWidget* shelf_widget() { return shelf_widget_; } |
107 | 105 |
108 // Set the bounds of the launcher view. | 106 // Set the bounds of the launcher view. |
109 void SetLauncherViewBounds(gfx::Rect bounds); | 107 void SetLauncherViewBounds(gfx::Rect bounds); |
110 gfx::Rect GetLauncherViewBounds() const; | 108 gfx::Rect GetLauncherViewBounds() const; |
111 | 109 |
112 // Returns ApplicationDragAndDropHost for this Launcher. | 110 // Returns ApplicationDragAndDropHost for this Launcher. |
113 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); | 111 app_list::ApplicationDragAndDropHost* GetDragAndDropHostForAppList(); |
114 | 112 |
115 private: | 113 private: |
116 // LauncherView used to display icons. | 114 // LauncherView used to display icons. |
117 internal::LauncherView* launcher_view_; | 115 internal::LauncherView* launcher_view_; |
118 | 116 |
119 ShelfAlignment alignment_; | 117 ShelfAlignment alignment_; |
120 | 118 |
121 LauncherDelegate* delegate_; | 119 LauncherDelegate* delegate_; |
122 | 120 |
123 ShelfWidget* shelf_widget_; | 121 ShelfWidget* shelf_widget_; |
124 | 122 |
125 DISALLOW_COPY_AND_ASSIGN(Launcher); | 123 DISALLOW_COPY_AND_ASSIGN(Launcher); |
126 }; | 124 }; |
127 | 125 |
128 } // namespace ash | 126 } // namespace ash |
129 | 127 |
130 #endif // ASH_LAUNCHER_LAUNCHER_H_ | 128 #endif // ASH_LAUNCHER_LAUNCHER_H_ |
OLD | NEW |