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

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

Issue 2591333002: Register app and window icon properties for aura mus conversion. (Closed)
Patch Set: Created 3 years, 12 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
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "mojo/public/cpp/bindings/type_converter.h" 7 #include "mojo/public/cpp/bindings/type_converter.h"
8 #include "services/ui/public/cpp/property_type_converters.h" 8 #include "services/ui/public/cpp/property_type_converters.h"
9 #include "services/ui/public/interfaces/window_manager.mojom.h" 9 #include "services/ui/public/interfaces/window_manager.mojom.h"
10 #include "ui/aura/client/aura_constants.h" 10 #include "ui/aura/client/aura_constants.h"
(...skipping 14 matching lines...) Expand all
25 return base::MakeUnique<std::vector<uint8_t>>( 25 return base::MakeUnique<std::vector<uint8_t>>(
26 mojo::ConvertTo<std::vector<uint8_t>>(*value)); 26 mojo::ConvertTo<std::vector<uint8_t>>(*value));
27 } 27 }
28 28
29 } // namespace 29 } // namespace
30 30
31 PropertyConverter::PropertyConverter() { 31 PropertyConverter::PropertyConverter() {
32 // Add known aura properties with associated mus properties. 32 // Add known aura properties with associated mus properties.
33 RegisterProperty(client::kAlwaysOnTopKey, 33 RegisterProperty(client::kAlwaysOnTopKey,
34 ui::mojom::WindowManager::kAlwaysOnTop_Property); 34 ui::mojom::WindowManager::kAlwaysOnTop_Property);
35 RegisterProperty(client::kAppIconKey,
36 ui::mojom::WindowManager::kAppIcon_Property);
35 RegisterProperty(client::kAppIdKey, 37 RegisterProperty(client::kAppIdKey,
36 ui::mojom::WindowManager::kAppID_Property); 38 ui::mojom::WindowManager::kAppID_Property);
37 RegisterProperty(client::kNameKey, ui::mojom::WindowManager::kName_Property); 39 RegisterProperty(client::kNameKey, ui::mojom::WindowManager::kName_Property);
38 RegisterProperty(client::kPreferredSize, 40 RegisterProperty(client::kPreferredSize,
39 ui::mojom::WindowManager::kPreferredSize_Property); 41 ui::mojom::WindowManager::kPreferredSize_Property);
40 RegisterProperty(client::kResizeBehaviorKey, 42 RegisterProperty(client::kResizeBehaviorKey,
41 ui::mojom::WindowManager::kResizeBehavior_Property); 43 ui::mojom::WindowManager::kResizeBehavior_Property);
42 RegisterProperty(client::kRestoreBoundsKey, 44 RegisterProperty(client::kRestoreBoundsKey,
43 ui::mojom::WindowManager::kRestoreBounds_Property); 45 ui::mojom::WindowManager::kRestoreBounds_Property);
44 RegisterProperty(client::kShowStateKey, 46 RegisterProperty(client::kShowStateKey,
45 ui::mojom::WindowManager::kShowState_Property); 47 ui::mojom::WindowManager::kShowState_Property);
46 RegisterProperty(client::kTitleKey, 48 RegisterProperty(client::kTitleKey,
47 ui::mojom::WindowManager::kWindowTitle_Property); 49 ui::mojom::WindowManager::kWindowTitle_Property);
50 RegisterProperty(client::kWindowIconKey,
51 ui::mojom::WindowManager::kWindowIcon_Property);
48 } 52 }
49 53
50 PropertyConverter::~PropertyConverter() {} 54 PropertyConverter::~PropertyConverter() {}
51 55
52 bool PropertyConverter::ConvertPropertyForTransport( 56 bool PropertyConverter::ConvertPropertyForTransport(
53 Window* window, 57 Window* window,
54 const void* key, 58 const void* key,
55 std::string* transport_name, 59 std::string* transport_name,
56 std::unique_ptr<std::vector<uint8_t>>* transport_value) { 60 std::unique_ptr<std::vector<uint8_t>>* transport_value) {
57 *transport_name = GetTransportNameForPropertyKey(key); 61 *transport_name = GetTransportNameForPropertyKey(key);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 string_properties_[property] = transport_name; 255 string_properties_[property] = transport_name;
252 } 256 }
253 257
254 void PropertyConverter::RegisterProperty( 258 void PropertyConverter::RegisterProperty(
255 const WindowProperty<base::string16*>* property, 259 const WindowProperty<base::string16*>* property,
256 const char* transport_name) { 260 const char* transport_name) {
257 string16_properties_[property] = transport_name; 261 string16_properties_[property] = transport_name;
258 } 262 }
259 263
260 } // namespace aura 264 } // namespace aura
OLDNEW
« no previous file with comments | « services/ui/public/interfaces/window_manager.mojom ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698