Chromium Code Reviews| 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 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 258 ui::mojom::WindowManager::kRendererParentTitleArea_Property); | 258 ui::mojom::WindowManager::kRendererParentTitleArea_Property); |
| 259 } | 259 } |
| 260 | 260 |
| 261 int64_t GetInitialDisplayId(const ui::Window::SharedProperties& properties) { | 261 int64_t GetInitialDisplayId(const ui::Window::SharedProperties& properties) { |
| 262 auto iter = | 262 auto iter = |
| 263 properties.find(ui::mojom::WindowManager::kInitialDisplayId_Property); | 263 properties.find(ui::mojom::WindowManager::kInitialDisplayId_Property); |
| 264 return iter == properties.end() ? display::Display::kInvalidDisplayID | 264 return iter == properties.end() ? display::Display::kInvalidDisplayID |
| 265 : mojo::ConvertTo<int64_t>(iter->second); | 265 : mojo::ConvertTo<int64_t>(iter->second); |
| 266 } | 266 } |
| 267 | 267 |
| 268 void SetExcludeFromMru(ui::Window* window, bool value) { | |
| 269 window->SetSharedProperty<bool>( | |
|
msw
2016/10/11 22:36:05
aside: it'd be nice to have something like ui::Win
sky
2016/10/11 22:57:04
I think the way we set shared properties is too ve
| |
| 270 ui::mojom::WindowManager::kExcludeFromMru_Property, value); | |
| 271 } | |
| 272 | |
| 273 bool GetExcludeFromMru(const ui::Window* window) { | |
| 274 return window->HasSharedProperty( | |
| 275 ui::mojom::WindowManager::kExcludeFromMru_Property) && | |
| 276 window->GetSharedProperty<bool>( | |
| 277 ui::mojom::WindowManager::kExcludeFromMru_Property); | |
| 278 } | |
| 279 | |
| 268 } // namespace mus | 280 } // namespace mus |
| 269 } // namespace ash | 281 } // namespace ash |
| OLD | NEW |