Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: ui/aura/mus/property_converter.cc

Issue 2632543003: Refactor and push window properties up to class properties. (Closed)
Patch Set: Caught a few stragglers Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 string_properties_[property] = transport_name; 257 string_properties_[property] = transport_name;
258 } 258 }
259 259
260 void PropertyConverter::RegisterProperty( 260 void PropertyConverter::RegisterProperty(
261 const WindowProperty<base::string16*>* property, 261 const WindowProperty<base::string16*>* property,
262 const char* transport_name) { 262 const char* transport_name) {
263 string16_properties_[property] = transport_name; 263 string16_properties_[property] = transport_name;
264 } 264 }
265 265
266 } // namespace aura 266 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698