Index: chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h |
diff --git a/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h b/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h |
index c7978db19222f0257f12e0378065b356821a3108..738daf03664b32ff8cf68cf8e5d4b934eec83086 100644 |
--- a/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h |
+++ b/chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h |
@@ -5,12 +5,15 @@ |
#ifndef CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_MUS_H_ |
#define CHROME_BROWSER_UI_ASH_APP_LIST_APP_LIST_PRESENTER_DELEGATE_MUS_H_ |
-#include "ui/app_list/presenter/app_list_presenter_delegate.h" |
- |
#include "base/macros.h" |
+#include "ui/app_list/presenter/app_list_presenter.h" |
mfomitchev
2016/09/29 18:38:26
You already forward declare this, why do you also
thanhph
2016/09/29 19:43:05
I'm not sure where I forward declare this. Can you
mfomitchev
2016/09/29 20:00:36
Put the include in the .cc. Forward declaration is
thanhph
2016/09/29 20:42:51
I understand. Thanks!
|
+#include "ui/app_list/presenter/app_list_presenter_delegate.h" |
+#include "ui/views/mus/pointer_watcher_event_router.h" |
mfomitchev
2016/09/29 18:38:26
Why do we need this?
thanhph
2016/09/29 19:43:04
We need this for receiving mouse/touch callback ev
mfomitchev
2016/09/29 20:00:36
Oh, ok, I see we are using PointerWatcherEventRout
thanhph
2016/09/29 20:42:51
Ok. Done!
|
+#include "ui/views/pointer_watcher.h" |
namespace app_list { |
class AppListView; |
+class AppListPresenter; |
class AppListViewDelegateFactory; |
} |
@@ -18,10 +21,13 @@ class AppListViewDelegateFactory; |
// Responsible for laying out the app list UI as well as dismissing the app list |
// on in response to certain events (e.g. on mouse/touch gesture outside of the |
// app list bounds). |
-class AppListPresenterDelegateMus : public app_list::AppListPresenterDelegate { |
+class AppListPresenterDelegateMus : public app_list::AppListPresenterDelegate, |
+ public views::PointerWatcher { |
public: |
explicit AppListPresenterDelegateMus( |
+ app_list::AppListPresenter* presenter, |
app_list::AppListViewDelegateFactory* view_delegate_factory); |
+ |
~AppListPresenterDelegateMus() override; |
// app_list::AppListPresenterDelegate: |
@@ -32,9 +38,14 @@ class AppListPresenterDelegateMus : public app_list::AppListPresenterDelegate { |
void OnShown(int64_t display_id) override; |
void OnDismissed() override; |
void UpdateBounds() override; |
+ |
gfx::Vector2d GetVisibilityAnimationOffset( |
aura::Window* root_window) override; |
+ void OnPointerEventObserved(const ui::PointerEvent& event, |
mfomitchev
2016/09/29 18:38:26
// views::PointerWatcher:
Also move to private.
thanhph
2016/09/29 19:43:04
done. thanks!
mfomitchev
2016/09/29 20:00:36
You forgot the comment.
thanhph
2016/09/29 20:42:51
My bad. Comment is added!
|
+ const gfx::Point& location_in_screen, |
+ views::Widget* target) override; |
+ |
private: |
// Whether the app list is visible (or in the process of being shown). |
bool is_visible_ = false; |
@@ -45,6 +56,8 @@ class AppListPresenterDelegateMus : public app_list::AppListPresenterDelegate { |
// The current AppListView, owned by its widget. |
app_list::AppListView* view_ = nullptr; |
+ app_list::AppListPresenter* presenter_; |
mfomitchev
2016/09/29 18:38:26
// Not owned. Pointer is guaranteed to be valid wh
thanhph
2016/09/29 19:43:05
done. thanks!
|
+ |
DISALLOW_COPY_AND_ASSIGN(AppListPresenterDelegateMus); |
}; |