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

Unified Diff: chrome/browser/ui/views/app_list/linux/app_list_linux.h

Issue 225053004: Refactor views app list services to allow more code sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oops - fix some names Created 6 years, 8 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
Index: chrome/browser/ui/views/app_list/linux/app_list_linux.h
diff --git a/chrome/browser/ui/views/app_list/linux/app_list_linux.h b/chrome/browser/ui/views/app_list/linux/app_list_linux.h
index 3825037901d054263a866608f40d58178f6f69f7..e252fd292483fa0bb298f0e538122a8dcff6e615 100644
--- a/chrome/browser/ui/views/app_list/linux/app_list_linux.h
+++ b/chrome/browser/ui/views/app_list/linux/app_list_linux.h
@@ -5,10 +5,7 @@
#ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_LINUX_H_
#define CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_LINUX_H_
-#include "base/callback.h"
-#include "chrome/browser/ui/app_list/app_list.h"
#include "chrome/browser/ui/app_list/app_list_positioner.h"
-#include "ui/app_list/views/app_list_view_observer.h"
namespace app_list {
class AppListView;
@@ -20,16 +17,9 @@ class Point;
class Size;
} // namespace gfx
-// Responsible for positioning, hiding and showing an AppListView on Linux.
-// This includes watching window activation/deactivation messages to determine
-// if the user has clicked away from it.
-class AppListLinux : public AppList,
- public app_list::AppListViewObserver {
+// Responsible for positioning an AppListView on Linux.
+class AppListLinux {
Matt Giuca 2014/04/29 03:52:51 This isn't really a class any more. Can you just t
tapted 2014/04/29 04:20:30 Yep! I'd actually propose putting `static void Mov
Matt Giuca 2014/04/30 00:41:23 OK, I'd rather not move these around in this CL. I
tapted 2014/04/30 03:26:03 Done.
public:
- AppListLinux(app_list::AppListView* view,
- const base::Closure& on_should_dismiss);
- virtual ~AppListLinux();
-
// Finds the position for a window to anchor it to the shelf. This chooses the
// most appropriate position for the window based on whether the shelf exists,
// the position of the shelf, and the mouse cursor. Returns the intended
@@ -40,27 +30,7 @@ class AppListLinux : public AppList,
const gfx::Point& cursor,
AppListPositioner::ScreenEdge edge);
- // AppList:
- virtual void Show() OVERRIDE;
- virtual void Hide() OVERRIDE;
- virtual void MoveNearCursor() OVERRIDE;
- virtual bool IsVisible() OVERRIDE;
- virtual void Prerender() OVERRIDE;
- virtual gfx::NativeWindow GetWindow() OVERRIDE;
- virtual void SetProfile(Profile* profile) OVERRIDE;
-
- // app_list::AppListViewObserver:
- virtual void OnActivationChanged(views::Widget* widget, bool active) OVERRIDE;
-
- private:
- // Weak pointer. The view manages its own lifetime.
- app_list::AppListView* view_;
- bool window_icon_updated_;
-
- // Called to request |view_| be closed.
- base::Closure on_should_dismiss_;
-
- DISALLOW_COPY_AND_ASSIGN(AppListLinux);
+ static void MoveNearCursor(app_list::AppListView* view);
};
#endif // CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_LINUX_H_

Powered by Google App Engine
This is Rietveld 408576698