OLD | NEW |
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" |
11 #include "mash/wm/shadow.h" | 11 #include "mash/wm/shadow.h" |
12 #include "ui/gfx/geometry/rect.h" | 12 #include "ui/gfx/geometry/rect.h" |
13 #include "ui/gfx/geometry/size.h" | 13 #include "ui/gfx/geometry/size.h" |
14 | 14 |
15 namespace mash { | 15 namespace mash { |
16 namespace wm { | 16 namespace wm { |
17 namespace { | 17 namespace { |
18 | 18 |
19 DEFINE_LOCAL_WINDOW_PROPERTY_KEY(Shadow*, kLocalShadowProperty, nullptr); | 19 MUS_DEFINE_LOCAL_WINDOW_PROPERTY_KEY(Shadow*, kLocalShadowProperty, nullptr); |
20 | 20 |
21 } // namespace | 21 } // namespace |
22 | 22 |
23 mus::mojom::ShowState GetWindowShowState(const mus::Window* window) { | 23 mus::mojom::ShowState GetWindowShowState(const mus::Window* window) { |
24 if (window->HasSharedProperty( | 24 if (window->HasSharedProperty( |
25 mus::mojom::WindowManager::kShowState_Property)) { | 25 mus::mojom::WindowManager::kShowState_Property)) { |
26 return static_cast<mus::mojom::ShowState>( | 26 return static_cast<mus::mojom::ShowState>( |
27 window->GetSharedProperty<int32_t>( | 27 window->GetSharedProperty<int32_t>( |
28 mus::mojom::WindowManager::kShowState_Property)); | 28 mus::mojom::WindowManager::kShowState_Property)); |
29 } | 29 } |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 if (iter != properties.end()) { | 114 if (iter != properties.end()) { |
115 return static_cast<mus::mojom::WindowType>( | 115 return static_cast<mus::mojom::WindowType>( |
116 mojo::TypeConverter<int32_t, const std::vector<uint8_t>>::Convert( | 116 mojo::TypeConverter<int32_t, const std::vector<uint8_t>>::Convert( |
117 iter->second)); | 117 iter->second)); |
118 } | 118 } |
119 return mus::mojom::WINDOW_TYPE_POPUP; | 119 return mus::mojom::WINDOW_TYPE_POPUP; |
120 } | 120 } |
121 | 121 |
122 } // namespace wm | 122 } // namespace wm |
123 } // namespace mash | 123 } // namespace mash |
OLD | NEW |