| Index: chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
|
| diff --git a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
|
| index cfec7427a6495ed8830ef9112e96b6c332b39b4b..cc4768c793ffc2702ab61dd1419e7d53069d9c61 100644
|
| --- a/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
|
| +++ b/chrome/browser/ui/ash/launcher/chrome_launcher_controller_per_app.h
|
| @@ -123,6 +123,15 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
|
| // be pinned.
|
| virtual bool IsPinnable(ash::LauncherID id) const OVERRIDE;
|
|
|
| + // If there is no launcher item in the launcher for application |app_id|, one
|
| + // gets created. The (existing or created) launcher items get then locked
|
| + // against a users un-pinning removal.
|
| + virtual void LockV1AppWithID(const std::string& app_id) OVERRIDE;
|
| +
|
| + // A previously locked launcher item of type |app_id| gets unlocked. If the
|
| + // lock count reaches 0 and the item is not pinned it will go away.
|
| + virtual void UnlockV1AppWithID(const std::string& app_id) OVERRIDE;
|
| +
|
| // Requests that the launcher item controller specified by |id| open a new
|
| // instance of the app. |event_flags| holds the flags of the event which
|
| // triggered this command.
|
| @@ -165,6 +174,10 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
|
| // Returns true if a pinned launcher item with given |app_id| could be found.
|
| virtual bool IsAppPinned(const std::string& app_id) OVERRIDE;
|
|
|
| + // Find out if the given application |id| is a windowed app item and not a
|
| + // pinned item in the launcher.
|
| + bool IsWindowedAppInLauncher(const std::string& app_id);
|
| +
|
| // Pins an app with |app_id| to launcher. If there is a running instance in
|
| // launcher, the running instance is pinned. If there is no running instance,
|
| // a new launcher item is created and pinned.
|
| @@ -318,6 +331,13 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
|
| friend class ChromeLauncherControllerPerAppTest;
|
| friend class LauncherPerAppAppBrowserTest;
|
|
|
| + // Creates a new app shortcut item and controller on the launcher at |index|.
|
| + // Use kInsertItemAtEnd to add a shortcut as the last item.
|
| + virtual ash::LauncherID CreateAppShortcutLauncherItemWithType(
|
| + const std::string& app_id,
|
| + int index,
|
| + ash::LauncherItemType launcher_item_type);
|
| +
|
| // Updates the activation state of the Broswer item.
|
| void UpdateBrowserItemStatus();
|
|
|
| @@ -359,11 +379,13 @@ class ChromeLauncherControllerPerApp : public ash::LauncherModelObserver,
|
|
|
| // Creates an app launcher to insert at |index|. Note that |index| may be
|
| // adjusted by the model to meet ordering constraints.
|
| + // The |launcher_item_type| will be set into the LauncherModel.
|
| ash::LauncherID InsertAppLauncherItem(
|
| LauncherItemController* controller,
|
| const std::string& app_id,
|
| ash::LauncherItemStatus status,
|
| - int index);
|
| + int index,
|
| + ash::LauncherItemType launcher_item_type);
|
|
|
| bool HasItemController(ash::LauncherID id) const;
|
|
|
|
|