| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/mus/property_util.h" | 5 #include "ash/mus/property_util.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "ash/mus/shadow.h" | 9 #include "ash/mus/shadow.h" |
| 10 #include "services/ui/public/cpp/property_type_converters.h" | 10 #include "services/ui/public/cpp/property_type_converters.h" |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 base::string16 GetWindowTitle(const ui::Window* window) { | 184 base::string16 GetWindowTitle(const ui::Window* window) { |
| 185 if (!window->HasSharedProperty( | 185 if (!window->HasSharedProperty( |
| 186 ui::mojom::WindowManager::kWindowTitle_Property)) { | 186 ui::mojom::WindowManager::kWindowTitle_Property)) { |
| 187 return base::string16(); | 187 return base::string16(); |
| 188 } | 188 } |
| 189 | 189 |
| 190 return window->GetSharedProperty<base::string16>( | 190 return window->GetSharedProperty<base::string16>( |
| 191 ui::mojom::WindowManager::kWindowTitle_Property); | 191 ui::mojom::WindowManager::kWindowTitle_Property); |
| 192 } | 192 } |
| 193 | 193 |
| 194 mojo::Array<uint8_t> GetWindowAppIcon(const ui::Window* window) { | |
| 195 if (window->HasSharedProperty( | |
| 196 ui::mojom::WindowManager::kWindowAppIcon_Property)) { | |
| 197 return mojo::Array<uint8_t>::From( | |
| 198 window->GetSharedProperty<std::vector<uint8_t>>( | |
| 199 ui::mojom::WindowManager::kWindowAppIcon_Property)); | |
| 200 } | |
| 201 return mojo::Array<uint8_t>(); | |
| 202 } | |
| 203 | |
| 204 void SetAppID(ui::Window* window, const base::string16& app_id) { | 194 void SetAppID(ui::Window* window, const base::string16& app_id) { |
| 205 window->SetSharedProperty<base::string16>( | 195 window->SetSharedProperty<base::string16>( |
| 206 ui::mojom::WindowManager::kAppID_Property, app_id); | 196 ui::mojom::WindowManager::kAppID_Property, app_id); |
| 207 } | 197 } |
| 208 | 198 |
| 209 base::string16 GetAppID(const ui::Window* window) { | 199 base::string16 GetAppID(const ui::Window* window) { |
| 210 if (!window->HasSharedProperty(ui::mojom::WindowManager::kAppID_Property)) | 200 if (!window->HasSharedProperty(ui::mojom::WindowManager::kAppID_Property)) |
| 211 return base::string16(); | 201 return base::string16(); |
| 212 | 202 |
| 213 return window->GetSharedProperty<base::string16>( | 203 return window->GetSharedProperty<base::string16>( |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 263 |
| 274 bool GetExcludeFromMru(const ui::Window* window) { | 264 bool GetExcludeFromMru(const ui::Window* window) { |
| 275 return window->HasSharedProperty( | 265 return window->HasSharedProperty( |
| 276 ui::mojom::WindowManager::kExcludeFromMru_Property) && | 266 ui::mojom::WindowManager::kExcludeFromMru_Property) && |
| 277 window->GetSharedProperty<bool>( | 267 window->GetSharedProperty<bool>( |
| 278 ui::mojom::WindowManager::kExcludeFromMru_Property); | 268 ui::mojom::WindowManager::kExcludeFromMru_Property); |
| 279 } | 269 } |
| 280 | 270 |
| 281 } // namespace mus | 271 } // namespace mus |
| 282 } // namespace ash | 272 } // namespace ash |
| OLD | NEW |