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

Side by Side Diff: mash/wm/property_util.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
« no previous file with comments | « mash/screenlock/screenlock.cc ('k') | mash/wm/user_window_controller_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "mash/wm/property_util.h" 5 #include "mash/wm/property_util.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "components/mus/public/cpp/property_type_converters.h" 9 #include "components/mus/public/cpp/property_type_converters.h"
10 #include "components/mus/public/cpp/window_property.h" 10 #include "components/mus/public/cpp/window_property.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 mus::mojom::WindowType GetWindowType(mus::Window* window) { 105 mus::mojom::WindowType GetWindowType(mus::Window* window) {
106 return GetWindowType(window->shared_properties()); 106 return GetWindowType(window->shared_properties());
107 } 107 }
108 108
109 mus::mojom::WindowType GetWindowType( 109 mus::mojom::WindowType GetWindowType(
110 const mus::Window::SharedProperties& properties) { 110 const mus::Window::SharedProperties& properties) {
111 const auto iter = 111 const auto iter =
112 properties.find(mus::mojom::WindowManager::kWindowType_Property); 112 properties.find(mus::mojom::WindowManager::kWindowType_Property);
113 if (iter != properties.end()) { 113 if (iter != properties.end()) {
114 return static_cast<mus::mojom::WindowType>( 114 return static_cast<mus::mojom::WindowType>(
115 mojo::TypeConverter<int32_t, const std::vector<uint8_t>>::Convert( 115 mojo::ConvertTo<int32_t>(iter->second));
116 iter->second));
117 } 116 }
118 return mus::mojom::WindowType::POPUP; 117 return mus::mojom::WindowType::POPUP;
119 } 118 }
120 119
121 } // namespace wm 120 } // namespace wm
122 } // namespace mash 121 } // namespace mash
OLDNEW
« no previous file with comments | « mash/screenlock/screenlock.cc ('k') | mash/wm/user_window_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698