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

Unified Diff: chrome/browser/ui/app_list_service.h

Issue 12207104: Refactor app_list_util.h into AppListService abstract base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes cocoa, back to windows Created 7 years, 10 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/app_list_service.h
diff --git a/chrome/browser/ui/app_list_service.h b/chrome/browser/ui/app_list_service.h
new file mode 100644
index 0000000000000000000000000000000000000000..758fdc80eaaa95871d8a382b883bb410cf8cc94d
--- /dev/null
+++ b/chrome/browser/ui/app_list_service.h
@@ -0,0 +1,84 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_APP_LIST_SERVICE_H_
benwells 2013/02/18 08:31:30 Why is this not in c/b/ui/app_list?
tapted 2013/02/18 10:27:55 The app_list folder is bound to ENABLE_APP_LIST -
tapted 2013/02/19 03:15:32 Done (I think... need to launch some builders).
+#define CHROME_BROWSER_UI_APP_LIST_SERVICE_H_
+
+#include <string>
+
+#include "base/basictypes.h"
+#include "chrome/browser/profiles/profile_info_cache_observer.h"
+
+class Profile;
+class PrefRegistrySimple;
+class Profile;
+
+namespace base {
+class FilePath;
+}
+
+namespace gfx {
+class ImageSkia;
+}
+
+class AppListService : public ProfileInfoCacheObserver {
+ public:
+ // Get the AppListService for the current platform and desktop type.
+ static AppListService* Get();
+
+ static base::FilePath GetAppListProfilePath(
+ const base::FilePath& user_data_dir);
+
+ static void RegisterAppListPrefs(PrefRegistrySimple* registry);
+
+ // Do any once off initialization needed for the app list.
+ virtual void Init(Profile* initial_profile);
+
+ // Show the app list.
+ virtual void ShowAppList(Profile* profile);
+
+ // Dismiss the app list.
+ virtual void DismissAppList();
+
+ virtual void SetAppListProfile(
+ const base::FilePath& profile_file_path);
+
+ // Get the profile the app list is currently showing.
+ virtual Profile* GetCurrentAppListProfile();
benwells 2013/02/18 08:31:30 Can we move things just for testing so they are to
tapted 2013/02/18 10:27:55 Shouldn't be an issue.
tapted 2013/02/19 03:15:32 \todo
+
+ // Returns true if the app list is visible.
+ virtual bool IsAppListVisible() const;
+
+ virtual void OnBeginExtensionInstall(Profile* profile,
+ const std::string& extension_id,
+ const std::string& extension_name,
+ const gfx::ImageSkia& installing_icon);
+
+ virtual void OnDownloadProgress(Profile* profile,
+ const std::string& extension_id,
+ int percent_downloaded);
+
+ virtual void OnExtensionInstallFailure(Profile* profile,
+ const std::string& extension_id);
+
+ // ProfileInfoCacheObserver overrides:
+ virtual void OnProfileAdded(const base::FilePath& profilePath) OVERRIDE;
+ virtual void OnProfileWillBeRemoved(
+ const base::FilePath& profile_path) OVERRIDE;
+ virtual void OnProfileWasRemoved(const base::FilePath& profile_path,
+ const string16& profile_name) OVERRIDE;
+ virtual void OnProfileNameChanged(const base::FilePath& profile_path,
+ const string16& profile_name) OVERRIDE;
+ virtual void OnProfileAvatarChanged(
+ const base::FilePath& profile_path) OVERRIDE;
+
+ protected:
+ AppListService() {}
+ virtual ~AppListService() {}
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(AppListService);
+};
+
+#endif // CHROME_BROWSER_UI_APP_LIST_SERVICE_H_

Powered by Google App Engine
This is Rietveld 408576698