Chromium Code Reviews| Index: ui/app_list/presenter/app_list_presenter_impl.h |
| diff --git a/ui/app_list/presenter/app_list_presenter_impl.h b/ui/app_list/presenter/app_list_presenter_impl.h |
| index 537d1c0dae2668273c2090429db467103f3cd5a4..570128e0ed4cc8add4db62b6f15550f5e1b5406a 100644 |
| --- a/ui/app_list/presenter/app_list_presenter_impl.h |
| +++ b/ui/app_list/presenter/app_list_presenter_impl.h |
| @@ -10,8 +10,9 @@ |
| #include "base/compiler_specific.h" |
| #include "base/macros.h" |
| #include "ui/app_list/pagination_model_observer.h" |
| -#include "ui/app_list/presenter/app_list_presenter.h" |
| +#include "ui/app_list/presenter/app_list_presenter.mojom.h" |
| #include "ui/app_list/presenter/app_list_presenter_delegate.h" |
| +#include "ui/app_list/presenter/app_list_presenter_export.h" |
| #include "ui/aura/client/focus_change_observer.h" |
| #include "ui/aura/window_observer.h" |
| #include "ui/compositor/layer_animation_observer.h" |
| @@ -34,8 +35,7 @@ class AppListViewDelegate; |
| // activation state to auto dismiss the UI. Delegates the responsibility |
| // for laying out the app list UI to ash::AppListLayoutDelegate. |
| class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl |
|
mfomitchev
2016/12/22 03:17:45
If we are getting rid of AppListPresenter interfac
msw
2016/12/22 16:31:52
I totally agree, I'll do that in a followup! It sh
|
| - : public AppListPresenter, |
| - public aura::client::FocusChangeObserver, |
| + : public aura::client::FocusChangeObserver, |
| public aura::WindowObserver, |
| public ui::ImplicitAnimationObserver, |
| public views::WidgetObserver, |
| @@ -50,12 +50,26 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl |
| // Returns app list view if one exists, or NULL otherwise. |
| AppListView* GetView() { return view_; } |
| - // AppListPresenter: |
| - void Show(int64_t display_id) override; |
| - void Dismiss() final; |
| - void ToggleAppList(int64_t display_id) override; |
| - bool IsVisible() const override; |
| - bool GetTargetVisibility() const override; |
| + // Show/hide app list window. The |window| is used to deterime in which |
| + // display (in which the |window| exists) the app list should be shown. |
| + void Show(int64_t display_id); |
| + |
| + // Invoked to dismiss app list. This may leave the view open but hidden from |
| + // the user. |
| + void Dismiss(); |
| + |
| + // Show the app list if it is visible, hide it if it is hidden. |
| + void ToggleAppList(int64_t display_id); |
| + |
| + // Returns current visibility of the app list. |
| + bool IsVisible() const; |
| + |
| + // Returns target visibility. This may differ from IsVisible() if a visibility |
| + // transition is in progress. |
| + bool GetTargetVisibility() const; |
| + |
| + // Sets the app list interface pointer; used to report visibility changes. |
| + void SetAppList(mojom::AppListPtr app_list); |
| private: |
| friend class test::AppListPresenterImplTestApi; |
| @@ -83,6 +97,7 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl |
| // views::WidgetObserver overrides: |
| void OnWidgetDestroying(views::Widget* widget) override; |
| + void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; |
| // PaginationModelObserver overrides: |
| void TotalPagesChanged() override; |
| @@ -112,6 +127,9 @@ class APP_LIST_PRESENTER_EXPORT AppListPresenterImpl |
| // Whether should schedule snap back animation. |
| bool should_snap_back_ = false; |
| + // The app list interface pointer; used for reporting visibility changes. |
| + mojom::AppListPtr app_list_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(AppListPresenterImpl); |
| }; |