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

Unified Diff: mash/wm/property_util.cc

Issue 1492323003: Updates shadow when active window changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge Created 5 years 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/shadow_controller.h » ('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 f08cf7a50b9429343c81f8309d4d25be45e30567..6295cd0016e63f09be79197dc29be88ce9daa817 100644
--- a/mash/wm/property_util.cc
+++ b/mash/wm/property_util.cc
@@ -7,11 +7,17 @@
#include "components/mus/public/cpp/property_type_converters.h"
#include "components/mus/public/cpp/window.h"
#include "components/mus/public/cpp/window_property.h"
+#include "mash/wm/shadow.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace mash {
namespace wm {
+namespace {
+
+DEFINE_LOCAL_WINDOW_PROPERTY_KEY(Shadow*, kLocalShadowProperty, nullptr);
+
+} // namespace
mus::mojom::ShowState GetWindowShowState(const mus::Window* window) {
if (window->HasSharedProperty(
@@ -88,5 +94,13 @@ gfx::Rect GetRestoreBounds(const mus::Window* window) {
return gfx::Rect();
}
+void SetShadow(mus::Window* window, Shadow* shadow) {
+ window->SetLocalProperty(kLocalShadowProperty, shadow);
+}
+
+Shadow* GetShadow(mus::Window* window) {
+ return window->GetLocalProperty(kLocalShadowProperty);
+}
+
} // namespace wm
} // namespace mash
« no previous file with comments | « mash/wm/property_util.h ('k') | mash/wm/shadow_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698