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

Unified Diff: mash/wm/property_util.cc

Issue 1954933002: Initial cut of ash/wm/common classes for mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge to trunk Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mash/wm/property_util.h ('k') | mash/wm/public/interfaces/container.mojom » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/property_util.cc
diff --git a/mash/wm/property_util.cc b/mash/wm/property_util.cc
index e95271e585f768e1bdf25d3a63da9de30dfb4db5..53e1d09301a0e99b4dc9e73cc4b083996389e76f 100644
--- a/mash/wm/property_util.cc
+++ b/mash/wm/property_util.cc
@@ -33,7 +33,7 @@ mus::mojom::ShowState GetWindowShowState(const mus::Window* window) {
window->GetSharedProperty<int32_t>(
mus::mojom::WindowManager::kShowState_Property));
}
- return mus::mojom::ShowState::RESTORED;
+ return mus::mojom::ShowState::DEFAULT;
}
void SetWindowUserSetBounds(mus::Window* window, const gfx::Rect& bounds) {
@@ -129,6 +129,33 @@ mus::mojom::WindowType GetWindowType(
return mus::mojom::WindowType::POPUP;
}
+ui::wm::WindowType GetWmWindowType(const mus::Window* window) {
+ switch (GetWindowType(window)) {
+ case mus::mojom::WindowType::WINDOW:
+ return ui::wm::WINDOW_TYPE_NORMAL;
+
+ case mus::mojom::WindowType::PANEL:
+ return ui::wm::WINDOW_TYPE_PANEL;
+
+ case mus::mojom::WindowType::CONTROL:
+ return ui::wm::WINDOW_TYPE_CONTROL;
+
+ case mus::mojom::WindowType::WINDOW_FRAMELESS:
+ case mus::mojom::WindowType::POPUP:
+ case mus::mojom::WindowType::BUBBLE:
+ case mus::mojom::WindowType::DRAG:
+ return ui::wm::WINDOW_TYPE_POPUP;
+
+ case mus::mojom::WindowType::MENU:
+ return ui::wm::WINDOW_TYPE_MENU;
+
+ case mus::mojom::WindowType::TOOLTIP:
+ return ui::wm::WINDOW_TYPE_TOOLTIP;
+ }
+
+ return ui::wm::WINDOW_TYPE_UNKNOWN;
+}
+
mojom::AshWindowType GetAshWindowType(const mus::Window* window) {
if (!window->HasSharedProperty(mojom::kAshWindowType_Property))
return mojom::AshWindowType::COUNT;
« no previous file with comments | « mash/wm/property_util.h ('k') | mash/wm/public/interfaces/container.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698