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