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

Unified Diff: ash/mus/property_util.cc

Issue 2724693002: mash: improves browser frame decorations (Closed)
Patch Set: merge Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/property_util.h ('k') | ash/public/cpp/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/property_util.cc
diff --git a/ash/mus/property_util.cc b/ash/mus/property_util.cc
index 0ebcc0b98f74ac14c37210e8a32125eca65e966f..40adf4085d0c2b6bc712300ad2312fdab67a0a8a 100644
--- a/ash/mus/property_util.cc
+++ b/ash/mus/property_util.cc
@@ -4,6 +4,8 @@
#include "ash/mus/property_util.h"
+#include "ash/public/cpp/window_style.h"
+#include "ash/public/interfaces/window_style.mojom.h"
#include "services/ui/public/cpp/property_type_converters.h"
#include "services/ui/public/interfaces/window_manager.mojom.h"
#include "ui/aura/mus/property_converter.h"
@@ -64,6 +66,16 @@ bool ShouldEnableImmersive(const InitProperties& properties) {
return iter == properties.end() || !mojo::ConvertTo<bool>(iter->second);
}
+mojom::WindowStyle GetWindowStyle(const InitProperties& properties) {
+ auto iter = properties.find(mojom::kAshWindowStyle_InitProperty);
+ if (iter == properties.end())
+ return mojom::WindowStyle::DEFAULT;
+
+ const int32_t value = mojo::ConvertTo<int32_t>(iter->second);
+ return IsValidWindowStyle(value) ? static_cast<mojom::WindowStyle>(value)
+ : mojom::WindowStyle::DEFAULT;
+}
+
void ApplyProperties(
aura::Window* window,
aura::PropertyConverter* property_converter,
« no previous file with comments | « ash/mus/property_util.h ('k') | ash/public/cpp/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698