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

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: Fixing build breakage with clang 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..becae2a74e02a7182666bf5525ee82487f81b039 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,
@@ -44,11 +45,19 @@ class LauncherItemController {
Type type() const { return type_; }
ash::LauncherID launcher_id() const { return launcher_id_; }
void set_launcher_id(ash::LauncherID id) { launcher_id_ = id; }
- const std::string& app_id() const { return app_id_; }
+ virtual const std::string& app_id() const;
ChromeLauncherController* launcher_controller() {
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);
};
« no previous file with comments | « chrome/browser/ui/ash/launcher/launcher_context_menu.cc ('k') | chrome/browser/ui/ash/launcher/launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698