OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "ui/aura/mus/property_converter.h" | 5 #include "ui/aura/mus/property_converter.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "mojo/public/cpp/bindings/type_converter.h" | 8 #include "mojo/public/cpp/bindings/type_converter.h" |
9 #include "services/ui/public/cpp/property_type_converters.h" | 9 #include "services/ui/public/cpp/property_type_converters.h" |
10 #include "services/ui/public/interfaces/window_manager.mojom.h" | 10 #include "services/ui/public/interfaces/window_manager.mojom.h" |
11 #include "ui/aura/client/aura_constants.h" | 11 #include "ui/aura/client/aura_constants.h" |
12 #include "ui/aura/window_property.h" | 12 #include "ui/base/class_property.h" |
13 | 13 |
14 namespace aura { | 14 namespace aura { |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Get the WindowProperty's value as a byte array. Only supports aura properties | 18 // Get the WindowProperty's value as a byte array. Only supports aura properties |
19 // that point to types with a matching std::vector<uint8_t> mojo::TypeConverter. | 19 // that point to types with a matching std::vector<uint8_t> mojo::TypeConverter. |
20 template <typename T> | 20 template <typename T> |
21 std::unique_ptr<std::vector<uint8_t>> GetArray(Window* window, | 21 std::unique_ptr<std::vector<uint8_t>> GetArray(Window* window, |
22 const WindowProperty<T>* key) { | 22 const WindowProperty<T>* key) { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 string_properties_[property] = transport_name; | 256 string_properties_[property] = transport_name; |
257 } | 257 } |
258 | 258 |
259 void PropertyConverter::RegisterProperty( | 259 void PropertyConverter::RegisterProperty( |
260 const WindowProperty<base::string16*>* property, | 260 const WindowProperty<base::string16*>* property, |
261 const char* transport_name) { | 261 const char* transport_name) { |
262 string16_properties_[property] = transport_name; | 262 string16_properties_[property] = transport_name; |
263 } | 263 } |
264 | 264 |
265 } // namespace aura | 265 } // namespace aura |
OLD | NEW |