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

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

Issue 2632543003: Refactor and push window properties up to class properties. (Closed)
Patch Set: More build fixes 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 string_properties_[property] = transport_name; 259 string_properties_[property] = transport_name;
260 } 260 }
261 261
262 void PropertyConverter::RegisterProperty( 262 void PropertyConverter::RegisterProperty(
263 const WindowProperty<base::string16*>* property, 263 const WindowProperty<base::string16*>* property,
264 const char* transport_name) { 264 const char* transport_name) {
265 string16_properties_[property] = transport_name; 265 string16_properties_[property] = transport_name;
266 } 266 }
267 267
268 } // namespace aura 268 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698