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

Unified Diff: chrome/browser/ui/views/app_list/linux/app_list_service_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: rebase+sim30 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_service_linux.h
diff --git a/chrome/browser/ui/views/app_list/linux/app_list_service_linux.h b/chrome/browser/ui/views/app_list/linux/app_list_service_linux.h
index 81a204695c91c6d29b6a439334aec381bb3d3972..1dc35f23147294414b32f31744ed55c3be3ef306 100644
--- a/chrome/browser/ui/views/app_list/linux/app_list_service_linux.h
+++ b/chrome/browser/ui/views/app_list/linux/app_list_service_linux.h
@@ -5,44 +5,36 @@
#ifndef CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_
#define CHROME_BROWSER_UI_VIEWS_APP_LIST_LINUX_APP_LIST_SERVICE_LINUX_H_
-#include "base/memory/scoped_ptr.h"
-#include "chrome/browser/ui/app_list/app_list_service_impl.h"
+#include "chrome/browser/ui/app_list/app_list_service_views.h"
+#include "ui/app_list/views/app_list_view_observer.h"
template <typename T> struct DefaultSingletonTraits;
-class AppListShower;
-
// AppListServiceLinux manages global resources needed for the app list to
// operate, and controls when the app list is opened and closed.
-class AppListServiceLinux : public AppListServiceImpl {
+class AppListServiceLinux : public AppListServiceViews,
+ public app_list::AppListViewObserver {
public:
virtual ~AppListServiceLinux();
static AppListServiceLinux* GetInstance();
- void set_can_close(bool can_close);
- void OnViewBeingDestroyed();
-
- // AppListService overrides:
- virtual void Init(Profile* initial_profile) OVERRIDE;
- virtual void CreateForProfile(Profile* requested_profile) OVERRIDE;
- virtual void ShowForProfile(Profile* requested_profile) OVERRIDE;
- virtual void DismissAppList() OVERRIDE;
- virtual bool IsAppListVisible() const OVERRIDE;
- virtual gfx::NativeWindow GetAppListWindow() OVERRIDE;
- virtual Profile* GetCurrentAppListProfile() OVERRIDE;
- virtual AppListControllerDelegate* GetControllerDelegate() OVERRIDE;
// AppListServiceImpl overrides:
virtual void CreateShortcut() OVERRIDE;
+ // app_list::AppListViewObserver overrides:
+ virtual void OnActivationChanged(views::Widget* widget, bool active) OVERRIDE;
+
private:
friend struct DefaultSingletonTraits<AppListServiceLinux>;
- AppListServiceLinux();
+ // AppListShowerDelegate overrides:
+ virtual void OnViewCreated() OVERRIDE;
+ virtual void OnViewBeingDestroyed() OVERRIDE;
+ virtual void OnViewDismissed() OVERRIDE;
+ virtual void MoveNearCursor(app_list::AppListView* view) OVERRIDE;
- // Responsible for putting views on the screen.
- scoped_ptr<AppListShower> shower_;
- scoped_ptr<AppListControllerDelegate> controller_delegate_;
+ AppListServiceLinux();
DISALLOW_COPY_AND_ASSIGN(AppListServiceLinux);
};

Powered by Google App Engine
This is Rietveld 408576698