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

Unified Diff: ash/wm/default_window_resizer.cc

Issue 127053005: Cleanup: remove Details::window. Use GetTarget() when possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index 97dbbe7773a4020c7636e317eabf2285a98b0037..49c367e15bcd4fa25eccdd8c0222a396c2dd1cc3 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -32,11 +32,11 @@ DefaultWindowResizer::Create(aura::Window* window,
void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
gfx::Rect bounds(CalculateBoundsForDrag(details_, location));
- if (bounds != details_.window->bounds()) {
+ if (bounds != GetTarget()->bounds()) {
if (!did_move_or_resize_ && !details_.restore_bounds.IsEmpty())
- wm::GetWindowState(details_.window)->ClearRestoreBounds();
+ wm::GetWindowState(GetTarget())->ClearRestoreBounds();
did_move_or_resize_ = true;
- details_.window->SetBounds(bounds);
+ GetTarget()->SetBounds(bounds);
}
}
@@ -47,15 +47,15 @@ void DefaultWindowResizer::RevertDrag() {
if (!did_move_or_resize_)
return;
- details_.window->SetBounds(details_.initial_bounds_in_parent);
+ GetTarget()->SetBounds(details_.initial_bounds_in_parent);
if (!details_.restore_bounds.IsEmpty())
- wm::GetWindowState(details_.window)->SetRestoreBoundsInScreen(
+ wm::GetWindowState(GetTarget())->SetRestoreBoundsInScreen(
details_.restore_bounds);
}
aura::Window* DefaultWindowResizer::GetTarget() {
- return details_.window;
+ return details_.window();
}
const gfx::Point& DefaultWindowResizer::GetInitialLocation() const {

Powered by Google App Engine
This is Rietveld 408576698