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

Unified Diff: components/exo/shell_surface.cc

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: components/exo/shell_surface.cc
diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc
index 1d4a16aa7afe4143d14aa63f0d5c0568e38821c9..e4fff6f17a71d2ddb9ce98a97105c2dec3b6f52f 100644
--- a/components/exo/shell_surface.cc
+++ b/components/exo/shell_surface.cc
@@ -555,13 +555,14 @@ void ShellSurface::UpdateSystemModal() {
void ShellSurface::SetApplicationId(aura::Window* window,
const std::string& id) {
TRACE_EVENT1("exo", "ShellSurface::SetApplicationId", "application_id", id);
- window->SetProperty(ash::kShelfIDKey, new ash::ShelfID(id));
+ const ash::ShelfID shelf_id(id);
+ window->SetProperty(ash::kShelfIDKey, new std::string(shelf_id.Serialize()));
}
// static
const std::string ShellSurface::GetApplicationId(aura::Window* window) {
- ash::ShelfID* shelf_id = window->GetProperty(ash::kShelfIDKey);
- return shelf_id ? shelf_id->app_id : std::string();
+ return ash::ShelfID::Deserialize(window->GetProperty(ash::kShelfIDKey))
+ .app_id;
}
void ShellSurface::SetApplicationId(const std::string& application_id) {

Powered by Google App Engine
This is Rietveld 408576698