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

Side by Side Diff: mash/wm/property_util.cc

Issue 2024313002: Moves mash/wm/public -> ash/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: extra Created 4 years, 6 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 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 gfx::Size GetWindowPreferredSize(const mus::Window* window) { 64 gfx::Size GetWindowPreferredSize(const mus::Window* window) {
65 if (window->HasSharedProperty( 65 if (window->HasSharedProperty(
66 mus::mojom::WindowManager::kPreferredSize_Property)) { 66 mus::mojom::WindowManager::kPreferredSize_Property)) {
67 return window->GetSharedProperty<gfx::Size>( 67 return window->GetSharedProperty<gfx::Size>(
68 mus::mojom::WindowManager::kPreferredSize_Property); 68 mus::mojom::WindowManager::kPreferredSize_Property);
69 } 69 }
70 return gfx::Size(); 70 return gfx::Size();
71 } 71 }
72 72
73 mojom::Container GetRequestedContainer(const mus::Window* window) { 73 ash::mojom::Container GetRequestedContainer(const mus::Window* window) {
74 if (window->HasSharedProperty(mojom::kWindowContainer_Property)) { 74 if (window->HasSharedProperty(ash::mojom::kWindowContainer_Property)) {
75 return static_cast<mojom::Container>( 75 return static_cast<ash::mojom::Container>(
76 window->GetSharedProperty<int32_t>(mojom::kWindowContainer_Property)); 76 window->GetSharedProperty<int32_t>(
77 ash::mojom::kWindowContainer_Property));
77 } 78 }
78 return mojom::Container::USER_PRIVATE_WINDOWS; 79 return ash::mojom::Container::USER_PRIVATE_WINDOWS;
79 } 80 }
80 81
81 int32_t GetResizeBehavior(const mus::Window* window) { 82 int32_t GetResizeBehavior(const mus::Window* window) {
82 if (window->HasSharedProperty( 83 if (window->HasSharedProperty(
83 mus::mojom::WindowManager::kResizeBehavior_Property)) { 84 mus::mojom::WindowManager::kResizeBehavior_Property)) {
84 return window->GetSharedProperty<int32_t>( 85 return window->GetSharedProperty<int32_t>(
85 mus::mojom::WindowManager::kResizeBehavior_Property); 86 mus::mojom::WindowManager::kResizeBehavior_Property);
86 } 87 }
87 return mus::mojom::kResizeBehaviorNone; 88 return mus::mojom::kResizeBehaviorNone;
88 } 89 }
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 case mus::mojom::WindowType::MENU: 151 case mus::mojom::WindowType::MENU:
151 return ui::wm::WINDOW_TYPE_MENU; 152 return ui::wm::WINDOW_TYPE_MENU;
152 153
153 case mus::mojom::WindowType::TOOLTIP: 154 case mus::mojom::WindowType::TOOLTIP:
154 return ui::wm::WINDOW_TYPE_TOOLTIP; 155 return ui::wm::WINDOW_TYPE_TOOLTIP;
155 } 156 }
156 157
157 return ui::wm::WINDOW_TYPE_UNKNOWN; 158 return ui::wm::WINDOW_TYPE_UNKNOWN;
158 } 159 }
159 160
160 mojom::AshWindowType GetAshWindowType(const mus::Window* window) { 161 ash::mojom::AshWindowType GetAshWindowType(const mus::Window* window) {
161 if (!window->HasSharedProperty(mojom::kAshWindowType_Property)) 162 if (!window->HasSharedProperty(ash::mojom::kAshWindowType_Property))
162 return mojom::AshWindowType::COUNT; 163 return ash::mojom::AshWindowType::COUNT;
163 164
164 return static_cast<mojom::AshWindowType>( 165 return static_cast<ash::mojom::AshWindowType>(
165 window->GetSharedProperty<int32_t>(mojom::kAshWindowType_Property)); 166 window->GetSharedProperty<int32_t>(ash::mojom::kAshWindowType_Property));
166 } 167 }
167 168
168 base::string16 GetWindowTitle(const mus::Window* window) { 169 base::string16 GetWindowTitle(const mus::Window* window) {
169 if (!window->HasSharedProperty( 170 if (!window->HasSharedProperty(
170 mus::mojom::WindowManager::kWindowTitle_Property)) { 171 mus::mojom::WindowManager::kWindowTitle_Property)) {
171 return base::string16(); 172 return base::string16();
172 } 173 }
173 174
174 return window->GetSharedProperty<base::string16>( 175 return window->GetSharedProperty<base::string16>(
175 mus::mojom::WindowManager::kWindowTitle_Property); 176 mus::mojom::WindowManager::kWindowTitle_Property);
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 225
225 bool IsAlwaysOnTop(mus::Window* window) { 226 bool IsAlwaysOnTop(mus::Window* window) {
226 return window->HasSharedProperty( 227 return window->HasSharedProperty(
227 mus::mojom::WindowManager::kAlwaysOnTop_Property) && 228 mus::mojom::WindowManager::kAlwaysOnTop_Property) &&
228 window->GetSharedProperty<bool>( 229 window->GetSharedProperty<bool>(
229 mus::mojom::WindowManager::kAlwaysOnTop_Property); 230 mus::mojom::WindowManager::kAlwaysOnTop_Property);
230 } 231 }
231 232
232 } // namespace wm 233 } // namespace wm
233 } // namespace mash 234 } // namespace mash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698