OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
6 #define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ | 6 #define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "ui/app_list/presenter/app_list_presenter_export.h" | 10 #include "ui/app_list/presenter/app_list_presenter_export.h" |
11 | 11 |
12 namespace aura { | 12 namespace aura { |
13 class Window; | 13 class Window; |
14 } | 14 } |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Vector2d; | 17 class Vector2d; |
18 } | 18 } |
19 | 19 |
20 namespace app_list { | 20 namespace app_list { |
21 | 21 |
22 class AppListView; | 22 class AppListView; |
23 class AppListViewDelegate; | 23 class AppListViewDelegate; |
24 | 24 |
25 // Delegate of AppListPresenter which allows to customize AppListPresenter's | 25 // Delegate of the app list presenter which allows customizing its behavior. |
26 // behavior. | |
27 // The design of this interface was heavily influenced by the needs of Ash's | 26 // The design of this interface was heavily influenced by the needs of Ash's |
28 // app list implementation (see ash::AppListPresenterDelegate). | 27 // app list implementation (see ash::AppListPresenterDelegate). |
29 class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegate { | 28 class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegate { |
30 public: | 29 public: |
31 virtual ~AppListPresenterDelegate() {} | 30 virtual ~AppListPresenterDelegate() {} |
32 | 31 |
33 // Returns the delegate for the app list view, possibly creating one. | 32 // Returns the delegate for the app list view, possibly creating one. |
34 virtual AppListViewDelegate* GetViewDelegate() = 0; | 33 virtual AppListViewDelegate* GetViewDelegate() = 0; |
35 | 34 |
36 // Called to initialize the layout of the app list. | 35 // Called to initialize the layout of the app list. |
(...skipping 18 matching lines...) Expand all Loading... |
55 protected: | 54 protected: |
56 // Offset in pixels to animation away/towards the shelf. | 55 // Offset in pixels to animation away/towards the shelf. |
57 const int kAnimationOffset = 8; | 56 const int kAnimationOffset = 8; |
58 | 57 |
59 int GetMinimumBoundsHeightForAppList(const app_list::AppListView* app_list); | 58 int GetMinimumBoundsHeightForAppList(const app_list::AppListView* app_list); |
60 }; | 59 }; |
61 | 60 |
62 } // namespace app_list | 61 } // namespace app_list |
63 | 62 |
64 #endif // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ | 63 #endif // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
OLD | NEW |