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

Unified Diff: chrome/browser/ui/views/app_list/win/app_list_service_win.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/win/app_list_service_win.h
diff --git a/chrome/browser/ui/views/app_list/win/app_list_service_win.h b/chrome/browser/ui/views/app_list/win/app_list_service_win.h
index e4d00698a04d7a796a15b2e454ba266f9bf15084..6181a749c8c3da6c7b4533b675d5497d78925c6e 100644
--- a/chrome/browser/ui/views/app_list/win/app_list_service_win.h
+++ b/chrome/browser/ui/views/app_list/win/app_list_service_win.h
@@ -6,36 +6,23 @@
#define CHROME_BROWSER_UI_VIEWS_APP_LIST_WIN_APP_LIST_SERVICE_WIN_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"
-namespace app_list{
-class AppListModel;
-}
+class ActivationTrackerWin;
-class AppListControllerDelegateWin;
-class AppListShower;
template <typename T> struct DefaultSingletonTraits;
-class AppListServiceWin : public AppListServiceImpl {
+class AppListServiceWin : public AppListServiceViews {
public:
- AppListServiceWin();
virtual ~AppListServiceWin();
static AppListServiceWin* GetInstance();
- void set_can_close(bool can_close);
- void OnViewBeingDestroyed();
// AppListService overrides:
virtual void SetAppListNextPaintCallback(void (*callback)()) OVERRIDE;
virtual void HandleFirstRun() OVERRIDE;
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;
@@ -43,6 +30,16 @@ class AppListServiceWin : public AppListServiceImpl {
private:
friend struct DefaultSingletonTraits<AppListServiceWin>;
+ // AppListServiceViews overrides:
+ virtual void OnViewBeingDestroyed();
+
+ // AppListShowerDelegate overrides:
+ virtual void OnViewCreated() OVERRIDE;
+ virtual void OnViewDismissed() OVERRIDE;
+ virtual void MoveNearCursor(app_list::AppListView* view) OVERRIDE;
+
+ AppListServiceWin();
+
bool IsWarmupNeeded();
void ScheduleWarmup();
@@ -54,11 +51,7 @@ class AppListServiceWin : public AppListServiceImpl {
void OnLoadProfileForWarmup(Profile* initial_profile);
bool enable_app_list_on_next_init_;
-
- // Responsible for putting views on the screen.
- scoped_ptr<AppListShower> shower_;
-
- scoped_ptr<AppListControllerDelegateWin> controller_delegate_;
+ scoped_ptr<ActivationTrackerWin> activation_tracker_;
DISALLOW_COPY_AND_ASSIGN(AppListServiceWin);
};

Powered by Google App Engine
This is Rietveld 408576698