Index: ash/public/cpp/shelf_types.h |
diff --git a/ash/public/cpp/shelf_types.h b/ash/public/cpp/shelf_types.h |
index c32f9db6b1d45461462db210013781645d312db6..a198dfa94601c8962f0120268bbd662ac8a9efea 100644 |
--- a/ash/public/cpp/shelf_types.h |
+++ b/ash/public/cpp/shelf_types.h |
@@ -6,8 +6,8 @@ |
#define ASH_PUBLIC_CPP_SHELF_TYPES_H_ |
#include <cstdint> |
+#include <string> |
-#include "ash/public/cpp/app_launch_id.h" |
#include "ash/public/cpp/ash_public_export.h" |
namespace ash { |
@@ -90,9 +90,6 @@ enum ShelfAction { |
SHELF_ACTION_APP_LIST_SHOWN, |
}; |
-// TODO(msw): Rename AppLaunchId to ShelfID. |
-using ShelfID = AppLaunchId; |
- |
// The type of a shelf item. |
enum ShelfItemType { |
// Represents a running app panel. |
@@ -135,6 +132,33 @@ enum ShelfItemStatus { |
STATUS_ATTENTION, |
}; |
+// A unique shelf item id composed of an |app_id| and a |launch_id|. |
+// |app_id| is the non-empty application id associated with a set of windows. |
+// |launch_id| is passed on app launch, to support multiple shelf items per app. |
+// As an example, a remote desktop client may want each remote application to |
+// have its own icon. |
+struct ASH_PUBLIC_EXPORT ShelfID { |
+ ShelfID(const std::string& app_id = std::string(), |
+ const std::string& launch_id = std::string()); |
+ ~ShelfID(); |
+ |
+ ShelfID(const ShelfID& other); |
+ ShelfID(ShelfID&& other); |
+ ShelfID& operator=(const ShelfID& other); |
+ bool operator==(const ShelfID& other) const; |
+ bool operator!=(const ShelfID& other) const; |
+ bool operator<(const ShelfID& other) const; |
+ |
+ // Returns true if both the application id and launch id are empty. |
+ // This is often used to determine if the id is invalid. |
+ bool IsNull() const; |
+ |
+ // The application id associated with a set of windows. |
+ std::string app_id; |
+ // An id passed on app launch, to support multiple shelf items per app. |
+ std::string launch_id; |
+}; |
+ |
} // namespace ash |
#endif // ASH_PUBLIC_CPP_SHELF_TYPES_H_ |