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

Side by Side Diff: ash/mus/sysui_application.cc

Issue 1832133002: mus: Remove unnecessary const from property TypeConverter templates (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 4 years, 9 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 "ash/mus/sysui_application.h" 5 #include "ash/mus/sysui_application.h"
6 6
7 #include "ash/desktop_background/desktop_background_controller.h" 7 #include "ash/desktop_background/desktop_background_controller.h"
8 #include "ash/host/ash_window_tree_host_init_params.h" 8 #include "ash/host/ash_window_tree_host_init_params.h"
9 #include "ash/host/ash_window_tree_host_platform.h" 9 #include "ash/host/ash_window_tree_host_platform.h"
10 #include "ash/mus/keyboard_ui_mus.h" 10 #include "ash/mus/keyboard_ui_mus.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 private: 125 private:
126 views::NativeWidget* InitNativeWidget( 126 views::NativeWidget* InitNativeWidget(
127 const views::Widget::InitParams& params, 127 const views::Widget::InitParams& params,
128 views::internal::NativeWidgetDelegate* delegate) { 128 views::internal::NativeWidgetDelegate* delegate) {
129 std::map<std::string, std::vector<uint8_t>> properties; 129 std::map<std::string, std::vector<uint8_t>> properties;
130 if (params.parent) { 130 if (params.parent) {
131 mash::wm::mojom::Container container = GetContainerId(params); 131 mash::wm::mojom::Container container = GetContainerId(params);
132 if (container != mash::wm::mojom::Container::COUNT) { 132 if (container != mash::wm::mojom::Container::COUNT) {
133 properties[mash::wm::mojom::kWindowContainer_Property] = 133 properties[mash::wm::mojom::kWindowContainer_Property] =
134 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 134 mojo::ConvertTo<std::vector<uint8_t>>(
135 static_cast<int32_t>(container)); 135 static_cast<int32_t>(container));
136 } 136 }
137 mash::wm::mojom::AshWindowType type = GetAshWindowType(params.parent); 137 mash::wm::mojom::AshWindowType type = GetAshWindowType(params.parent);
138 if (type != mash::wm::mojom::AshWindowType::COUNT) { 138 if (type != mash::wm::mojom::AshWindowType::COUNT) {
139 properties[mash::wm::mojom::kAshWindowType_Property] = 139 properties[mash::wm::mojom::kAshWindowType_Property] =
140 mojo::TypeConverter<const std::vector<uint8_t>, int32_t>::Convert( 140 mojo::ConvertTo<std::vector<uint8_t>>(static_cast<int32_t>(type));
141 static_cast<int32_t>(type));
142 } 141 }
143 } 142 }
144 143
145 // AshInit installs a stub implementation of ui::ContextFactory, so that the 144 // AshInit installs a stub implementation of ui::ContextFactory, so that the
146 // AshWindowTreeHost instances created do not actually show anything to the 145 // AshWindowTreeHost instances created do not actually show anything to the
147 // user. However, when creating a views::Widget instance, the 146 // user. However, when creating a views::Widget instance, the
148 // WindowManagerConnection creates a WindowTreeHostMus instance, which 147 // WindowManagerConnection creates a WindowTreeHostMus instance, which
149 // creates a ui::Compositor, and it needs a real ui::ContextFactory 148 // creates a ui::Compositor, and it needs a real ui::ContextFactory
150 // implementation. So, unset the context-factory here temporarily when 149 // implementation. So, unset the context-factory here temporarily when
151 // creating NativeWidgetMus. But restore the stub instance afterwards, so 150 // creating NativeWidgetMus. But restore the stub instance afterwards, so
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 ash_init_.reset(new AshInit()); 292 ash_init_.reset(new AshInit());
294 ash_init_->Initialize(connector); 293 ash_init_->Initialize(connector);
295 } 294 }
296 295
297 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) { 296 bool SysUIApplication::AcceptConnection(mojo::Connection* connection) {
298 return true; 297 return true;
299 } 298 }
300 299
301 } // namespace sysui 300 } // namespace sysui
302 } // namespace ash 301 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/shelf_delegate_mus.cc ('k') | components/mus/public/cpp/lib/property_type_converters.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698