Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4898)

Unified Diff: chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.h

Issue 2364173002: Add app_list_presenterr pointer in app_list_presenter_delegate_mus to use dismiss function (Closed)
Patch Set: remove unnecessary includes Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..240a8bfd78e47fffe0352a19432289f86b5357dd 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,22 +5,25 @@
#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_delegate.h"
+#include "ui/views/pointer_watcher.h"
namespace app_list {
+class AppListPresenter;
class AppListView;
class AppListViewDelegateFactory;
-}
+} // namespace app_list
// Mus+ash implementation of AppListPresetnerDelegate.
// 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(
+ AppListPresenterDelegateMus(
+ app_list::AppListPresenter* presenter,
app_list::AppListViewDelegateFactory* view_delegate_factory);
~AppListPresenterDelegateMus() override;
@@ -36,10 +39,18 @@ class AppListPresenterDelegateMus : public app_list::AppListPresenterDelegate {
aura::Window* root_window) override;
private:
+ // views::PointerWatcher:
+ void OnPointerEventObserved(const ui::PointerEvent& event,
+ const gfx::Point& location_in_screen,
+ views::Widget* target) override;
+
// Whether the app list is visible (or in the process of being shown).
bool is_visible_ = false;
// Not owned. Pointer is guaranteed to be valid while this object is alive.
+ app_list::AppListPresenter* presenter_;
+
+ // Not owned. Pointer is guaranteed to be valid while this object is alive.
app_list::AppListViewDelegateFactory* view_delegate_factory_;
// The current AppListView, owned by its widget.
« no previous file with comments | « no previous file | chrome/browser/ui/ash/app_list/app_list_presenter_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698