Chromium Code Reviews| Index: components/exo/shell_surface.cc |
| diff --git a/components/exo/shell_surface.cc b/components/exo/shell_surface.cc |
| index e4fff6f17a71d2ddb9ce98a97105c2dec3b6f52f..cee613102682d3d542ae61dfdd8b203b824a89f4 100644 |
| --- a/components/exo/shell_surface.cc |
| +++ b/components/exo/shell_surface.cc |
| @@ -313,6 +313,14 @@ ShellSurface::ScopedAnimationsDisabled::~ScopedAnimationsDisabled() { |
| DEFINE_LOCAL_UI_CLASS_PROPERTY_KEY(Surface*, kMainSurfaceKey, nullptr) |
| +namespace { |
|
reveman
2017/05/17 15:31:06
nit: for consistency, please remove this namespace
yawano
2017/05/18 02:06:28
Done. Moved it to the anonymous namespace at the t
|
| + |
| +// An application Id which is set by a wayland server. This property is not |
|
reveman
2017/05/17 15:31:06
This code should not be referring to wayland. How
yawano
2017/05/18 02:06:28
Done.
|
| +// exported. |
| +DEFINE_OWNED_UI_CLASS_PROPERTY_KEY(std::string, kExoAppIdKey, nullptr); |
| + |
| +} // namespace |
| + |
| ShellSurface::ShellSurface(Surface* surface, |
| ShellSurface* parent, |
| BoundsMode bounds_mode, |
| @@ -555,14 +563,13 @@ void ShellSurface::UpdateSystemModal() { |
| void ShellSurface::SetApplicationId(aura::Window* window, |
| const std::string& id) { |
| TRACE_EVENT1("exo", "ShellSurface::SetApplicationId", "application_id", id); |
| - const ash::ShelfID shelf_id(id); |
| - window->SetProperty(ash::kShelfIDKey, new std::string(shelf_id.Serialize())); |
| + window->SetProperty(kExoAppIdKey, new std::string(id)); |
| } |
| // static |
| const std::string ShellSurface::GetApplicationId(aura::Window* window) { |
|
reveman
2017/05/17 15:31:06
can this return a pointer instead so we don't have
yawano
2017/05/18 02:06:28
Done.
|
| - return ash::ShelfID::Deserialize(window->GetProperty(ash::kShelfIDKey)) |
| - .app_id; |
| + std::string* string_ptr = window->GetProperty(kExoAppIdKey); |
| + return string_ptr ? *string_ptr : std::string(); |
| } |
| void ShellSurface::SetApplicationId(const std::string& application_id) { |