| 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 "mash/wm/property_util.h" | 5 #include "mash/wm/property_util.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "components/mus/public/cpp/property_type_converters.h" | 9 #include "components/mus/public/cpp/property_type_converters.h" |
| 10 #include "components/mus/public/cpp/window_property.h" | 10 #include "components/mus/public/cpp/window_property.h" |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 mus::mojom::WindowType GetWindowType(mus::Window* window) { | 105 mus::mojom::WindowType GetWindowType(mus::Window* window) { |
| 106 return GetWindowType(window->shared_properties()); | 106 return GetWindowType(window->shared_properties()); |
| 107 } | 107 } |
| 108 | 108 |
| 109 mus::mojom::WindowType GetWindowType( | 109 mus::mojom::WindowType GetWindowType( |
| 110 const mus::Window::SharedProperties& properties) { | 110 const mus::Window::SharedProperties& properties) { |
| 111 const auto iter = | 111 const auto iter = |
| 112 properties.find(mus::mojom::WindowManager::kWindowType_Property); | 112 properties.find(mus::mojom::WindowManager::kWindowType_Property); |
| 113 if (iter != properties.end()) { | 113 if (iter != properties.end()) { |
| 114 return static_cast<mus::mojom::WindowType>( | 114 return static_cast<mus::mojom::WindowType>( |
| 115 mojo::TypeConverter<int32_t, const std::vector<uint8_t>>::Convert( | 115 mojo::ConvertTo<int32_t>(iter->second)); |
| 116 iter->second)); | |
| 117 } | 116 } |
| 118 return mus::mojom::WindowType::POPUP; | 117 return mus::mojom::WindowType::POPUP; |
| 119 } | 118 } |
| 120 | 119 |
| 121 } // namespace wm | 120 } // namespace wm |
| 122 } // namespace mash | 121 } // namespace mash |
| OLD | NEW |