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

Unified Diff: mash/wm/bridge/wm_window_mus.cc

Issue 1994763002: Wires up WorkspaceLayoutManager in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: data deps 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/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/frame/non_client_frame_view_mash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/bridge/wm_window_mus.cc
diff --git a/mash/wm/bridge/wm_window_mus.cc b/mash/wm/bridge/wm_window_mus.cc
index 7818280d8098ae1c0de6c4d40429889d1655df2d..da8ca9ed581699da1a6938be6c34056c2d68afee 100644
--- a/mash/wm/bridge/wm_window_mus.cc
+++ b/mash/wm/bridge/wm_window_mus.cc
@@ -24,6 +24,10 @@
MUS_DECLARE_WINDOW_PROPERTY_TYPE(mash::wm::WmWindowMus*);
+// TODO(sky): fully implement this. Making DVLOG as too spammy to be useful.
+#undef NOTIMPLEMENTED
+#define NOTIMPLEMENTED() DVLOG(1) << "notimplemented"
+
namespace mash {
namespace wm {
@@ -250,13 +254,13 @@ bool WmWindowMus::IsSystemModal() const {
}
bool WmWindowMus::GetBoolProperty(ash::wm::WmWindowProperty key) {
- NOTIMPLEMENTED();
switch (key) {
case ash::wm::WmWindowProperty::SNAP_CHILDREN_TO_PIXEL_BOUDARY:
+ NOTIMPLEMENTED();
return true;
case ash::wm::WmWindowProperty::ALWAYS_ON_TOP:
- return false;
+ return IsAlwaysOnTop();
default:
NOTREACHED();
@@ -268,9 +272,10 @@ bool WmWindowMus::GetBoolProperty(ash::wm::WmWindowProperty key) {
}
int WmWindowMus::GetIntProperty(ash::wm::WmWindowProperty key) {
- NOTIMPLEMENTED();
- if (key == ash::wm::WmWindowProperty::SHELF_ID)
+ if (key == ash::wm::WmWindowProperty::SHELF_ID) {
+ NOTIMPLEMENTED();
return 0;
+ }
NOTREACHED();
return 0;
@@ -476,14 +481,11 @@ void WmWindowMus::StackChildBelow(WmWindow* child, WmWindow* target) {
}
void WmWindowMus::SetAlwaysOnTop(bool value) {
- // TODO(sky): need to set property on window.
- NOTIMPLEMENTED();
+ mash::wm::SetAlwaysOnTop(window_, value);
}
bool WmWindowMus::IsAlwaysOnTop() const {
- // TODO(sky): need to set property on window.
- NOTIMPLEMENTED();
- return false;
+ return mash::wm::IsAlwaysOnTop(window_);
}
void WmWindowMus::Hide() {
@@ -583,10 +585,17 @@ void WmWindowMus::OnWindowSharedPropertyChanged(
const std::string& name,
const std::vector<uint8_t>* old_data,
const std::vector<uint8_t>* new_data) {
- if (name == mus::mojom::WindowManager::kShowState_Property)
+ if (name == mus::mojom::WindowManager::kShowState_Property) {
GetWindowState()->OnWindowShowStateChanged();
+ }
+ if (name == mus::mojom::WindowManager::kAlwaysOnTop_Property) {
+ FOR_EACH_OBSERVER(ash::wm::WmWindowObserver, observers_,
+ OnWindowPropertyChanged(
+ this, ash::wm::WmWindowProperty::ALWAYS_ON_TOP, 0u));
+ return;
+ }
- // Deal with always on top and snap.
+ // Deal with snap to pixel.
NOTIMPLEMENTED();
}
« no previous file with comments | « mash/wm/bridge/wm_root_window_controller_mus.cc ('k') | mash/wm/frame/non_client_frame_view_mash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698