| 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_SHOWER_APP_LIST_SHOWER_DELEGATE_H_ | 5 #ifndef UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
| 6 #define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_ | 6 #define UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "ui/app_list/shower/app_list_shower_export.h" | 8 #include "ui/app_list/presenter/app_list_presenter_export.h" |
| 9 | 9 |
| 10 namespace aura { | 10 namespace aura { |
| 11 class Window; | 11 class Window; |
| 12 } | 12 } |
| 13 | 13 |
| 14 namespace gfx { | 14 namespace gfx { |
| 15 class Vector2d; | 15 class Vector2d; |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace app_list { | 18 namespace app_list { |
| 19 | 19 |
| 20 class AppListView; | 20 class AppListView; |
| 21 class AppListViewDelegate; | 21 class AppListViewDelegate; |
| 22 | 22 |
| 23 // Delegate of AppListShower which allows to customize AppListShower's behavior. | 23 // Delegate of AppListPresenter which allows to customize AppListPresenter's |
| 24 // behavior. |
| 24 // The design of this interface was heavily influenced by the needs of Ash's | 25 // The design of this interface was heavily influenced by the needs of Ash's |
| 25 // app list implementation (see ash::AppListShowerDelegate). | 26 // app list implementation (see ash::AppListPresenterDelegate). |
| 26 class APP_LIST_SHOWER_EXPORT AppListShowerDelegate { | 27 class APP_LIST_PRESENTER_EXPORT AppListPresenterDelegate { |
| 27 public: | 28 public: |
| 28 virtual ~AppListShowerDelegate() {} | 29 virtual ~AppListPresenterDelegate() {} |
| 29 | 30 |
| 30 // Returns the delegate for the app list view, possibly creating one. | 31 // Returns the delegate for the app list view, possibly creating one. |
| 31 virtual AppListViewDelegate* GetViewDelegate() = 0; | 32 virtual AppListViewDelegate* GetViewDelegate() = 0; |
| 32 | 33 |
| 33 // Called to initialize the layout of the app list. | 34 // Called to initialize the layout of the app list. |
| 34 virtual void Init(AppListView* view, | 35 virtual void Init(AppListView* view, |
| 35 aura::Window* root_window, | 36 aura::Window* root_window, |
| 36 int current_apps_page) = 0; | 37 int current_apps_page) = 0; |
| 37 | 38 |
| 38 // Called when app list is shown. | 39 // Called when app list is shown. |
| 39 virtual void OnShown(aura::Window* root_window) = 0; | 40 virtual void OnShown(aura::Window* root_window) = 0; |
| 40 | 41 |
| 41 // Called when app list is dismissed | 42 // Called when app list is dismissed |
| 42 virtual void OnDismissed() = 0; | 43 virtual void OnDismissed() = 0; |
| 43 | 44 |
| 44 // Update app list bounds if necessary. | 45 // Update app list bounds if necessary. |
| 45 virtual void UpdateBounds() = 0; | 46 virtual void UpdateBounds() = 0; |
| 46 | 47 |
| 47 // Returns the offset vector by which the app list window should animate | 48 // Returns the offset vector by which the app list window should animate |
| 48 // when it gets hidden. | 49 // when it gets hidden. |
| 49 virtual gfx::Vector2d GetVisibilityAnimationOffset( | 50 virtual gfx::Vector2d GetVisibilityAnimationOffset( |
| 50 aura::Window* root_window) = 0; | 51 aura::Window* root_window) = 0; |
| 51 }; | 52 }; |
| 52 | 53 |
| 53 } // namespace app_list | 54 } // namespace app_list |
| 54 | 55 |
| 55 #endif // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_ | 56 #endif // UI_APP_LIST_PRESENTER_APP_LIST_PRESENTER_DELEGATE_H_ |
| OLD | NEW |