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

Unified Diff: ash/public/cpp/shelf_types.h

Issue 2878133002: mash: Serialize ShelfIDs for property conversion and transport. (Closed)
Patch Set: Remove |user_windows_with_items_| entries in workaround; disable a test in mash. Created 3 years, 7 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: ash/public/cpp/shelf_types.h
diff --git a/ash/public/cpp/shelf_types.h b/ash/public/cpp/shelf_types.h
index a198dfa94601c8962f0120268bbd662ac8a9efea..471069eb1054d0648bcce4fd435cd30b779cdce4 100644
--- a/ash/public/cpp/shelf_types.h
+++ b/ash/public/cpp/shelf_types.h
@@ -138,8 +138,8 @@ enum ShelfItemStatus {
// 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());
+ explicit ShelfID(const std::string& app_id = std::string(),
James Cook 2017/05/15 16:37:23 Good catch.
msw 2017/05/15 19:21:31 Acknowledged.
+ const std::string& launch_id = std::string());
~ShelfID();
ShelfID(const ShelfID& other);
@@ -153,6 +153,10 @@ struct ASH_PUBLIC_EXPORT ShelfID {
// This is often used to determine if the id is invalid.
bool IsNull() const;
+ // Functions to [de]serialize ids as a string for window property usage, etc.
+ std::string Serialize() const;
+ static ShelfID Deserialize(const std::string* string);
James Cook 2017/05/15 16:37:23 optional: Say something about validation / what ha
msw 2017/05/15 19:21:31 Done.
+
// 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.

Powered by Google App Engine
This is Rietveld 408576698