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

Unified Diff: ash/mus/bridge/wm_window_mus.cc

Issue 2388183002: Makes WmWindowMus restore bounds use property (Closed)
Patch Set: Created 4 years, 2 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/bridge/wm_window_mus.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/bridge/wm_window_mus.cc
diff --git a/ash/mus/bridge/wm_window_mus.cc b/ash/mus/bridge/wm_window_mus.cc
index efb3429640890c1411e8176a1750cbcb63a3ec68..c299dc5b36ad468c68c6576dffe57df0b24b3c4c 100644
--- a/ash/mus/bridge/wm_window_mus.cc
+++ b/ash/mus/bridge/wm_window_mus.cc
@@ -620,15 +620,16 @@ gfx::Rect WmWindowMus::GetTargetBounds() {
}
void WmWindowMus::ClearRestoreBounds() {
- restore_bounds_in_screen_.reset();
+ window_->ClearSharedProperty(
+ ui::mojom::WindowManager::kRestoreBounds_Property);
}
void WmWindowMus::SetRestoreBoundsInScreen(const gfx::Rect& bounds) {
- restore_bounds_in_screen_.reset(new gfx::Rect(bounds));
+ SetRestoreBounds(window_, bounds);
}
gfx::Rect WmWindowMus::GetRestoreBoundsInScreen() const {
- return *restore_bounds_in_screen_;
+ return GetRestoreBounds(window_);
}
bool WmWindowMus::Contains(const WmWindow* other) const {
@@ -678,7 +679,8 @@ void WmWindowMus::ReleaseCapture() {
}
bool WmWindowMus::HasRestoreBounds() const {
- return restore_bounds_in_screen_.get() != nullptr;
+ return window_->HasSharedProperty(
+ ui::mojom::WindowManager::kRestoreBounds_Property);
}
bool WmWindowMus::CanMaximize() const {
« no previous file with comments | « ash/mus/bridge/wm_window_mus.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698