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

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

Issue 12288012: Showing launcher items for windowed v1 apps - pinned or not. Also - don't show windowed v1 apps in … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test 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/ash/launcher/launcher_item_controller.h
diff --git a/chrome/browser/ui/ash/launcher/launcher_item_controller.h b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
index a77c17e72a2bf9691af8dce68eecbe10baea6e82..e3e8796b8849aa49b978ddfd1904056c50c8f3ef 100644
--- a/chrome/browser/ui/ash/launcher/launcher_item_controller.h
+++ b/chrome/browser/ui/ash/launcher/launcher_item_controller.h
@@ -33,7 +33,8 @@ class LauncherItemController {
TYPE_APP_PANEL,
TYPE_EXTENSION_PANEL,
TYPE_SHORTCUT,
- TYPE_TABBED
+ TYPE_TABBED,
+ TYPE_WINDOWED_APP
};
LauncherItemController(Type type,
@@ -49,6 +50,14 @@ class LauncherItemController {
return launcher_controller_;
}
+ // Lock this item to the launcher without being pinned (windowed v1 apps).
+ void lock() { locked_++; }
+ void unlock() {
+ DCHECK(locked_);
+ locked_--;
+ }
+ bool locked() { return locked_ > 0; }
+
// Returns the title for this item.
virtual string16 GetTitle() = 0;
@@ -101,6 +110,11 @@ class LauncherItemController {
ash::LauncherID launcher_id_;
ChromeLauncherController* launcher_controller_;
+ // The lock counter which tells the launcher if the item can be removed from
+ // the launcher (0) or not (>0). It is being used for windowed V1
+ // applications.
+ int locked_;
+
DISALLOW_COPY_AND_ASSIGN(LauncherItemController);
};

Powered by Google App Engine
This is Rietveld 408576698