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

Unified Diff: chrome/browser/ui/ash/launcher/chrome_launcher_controller.h

Issue 23580008: Fixed problems with pin/unpin preferences changing for not running applications & icon order chang… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/ash/launcher/chrome_launcher_controller.h
diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
index f8a67114faf6897faf9065564191dd8420c2e1f7..54b8e4e1a0241357af8a3dd167ba2a65e5ca7d17 100644
--- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
+++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller.h
@@ -86,18 +86,17 @@ class ChromeLauncherControllerUserSwitchObserver {
// * Shortcuts have no LauncherItemController.
// TODO(simon.hong81): Move LauncherItemDelegate out from
// ChromeLauncherController and makes separate subclass with it.
-class ChromeLauncherController
- : public ash::LauncherDelegate,
- public ash::LauncherItemDelegate,
- public ash::LauncherModelObserver,
- public ash::ShellObserver,
- public ash::DisplayController::Observer,
- public content::NotificationObserver,
- public extensions::AppIconLoader::Delegate,
- public PrefServiceSyncableObserver,
- public AppSyncUIStateObserver,
- public ExtensionEnableFlowDelegate,
- public ash::ShelfLayoutManagerObserver {
+class ChromeLauncherController : public ash::LauncherDelegate,
+ public ash::LauncherItemDelegate,
+ public ash::LauncherModelObserver,
+ public ash::ShellObserver,
+ public ash::DisplayController::Observer,
+ public content::NotificationObserver,
+ public extensions::AppIconLoader::Delegate,
+ public PrefServiceSyncableObserver,
+ public AppSyncUIStateObserver,
+ public ExtensionEnableFlowDelegate,
+ public ash::ShelfLayoutManagerObserver {
public:
// Indicates if a launcher item is incognito or not.
enum IncognitoState {
@@ -420,6 +419,16 @@ class ChromeLauncherController
void DoPinAppWithID(const std::string& app_id);
void DoUnpinAppWithID(const std::string& app_id);
+ // Pin a running app with |launcher_id| internally to |index|. It returns
+ // the index where the item was pinned. Note that this will not update the
+ // preferences.
+ int PinRunningAppInternal(int index, ash::LauncherID launcher_id);
+
+ // Unpin a locked application. This is an internal call which converts the
+ // model type of the given app index from a shortcut into an unpinned running
+ // app.
+ void UnpinRunningAppInternal(int index);
+
// Re-syncs launcher model with prefs::kPinnedLauncherApps.
void UpdateAppLaunchersFromPref();
@@ -467,6 +476,13 @@ class ChromeLauncherController
// Get browser shortcut's index from pref.
int GetChromeIconIndexFromPref() const;
+ // Get the browser shortcut's index in the shelf using the current's systems
+ // configuration of pinned and known (but not running) apps.
+ int GetChromeIconIndexForCreation();
+
+ // Get the list of pinned programs from the preferences.
+ void GetListOfPinnedAppsAndBrowser(std::vector<std::string>* pinned_apps);
oshima 2013/09/19 21:42:11 Just return std::vector<std::string> (See http://e
Mr4D (OOO till 08-26) 2013/09/19 22:31:50 Done.
+
// Close all windowed V1 applications of a certain extension which was already
// deleted.
void CloseWindowedAppsFromRemovedExtension(const std::string& app_id);

Powered by Google App Engine
This is Rietveld 408576698