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

Unified Diff: ash/wm/workspace/workspace_window_resizer.cc

Issue 1890713002: Adds WmWindow and converts WindowState to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge 2 trunk Created 4 years, 8 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/workspace/workspace_window_resizer.cc
diff --git a/ash/wm/workspace/workspace_window_resizer.cc b/ash/wm/workspace/workspace_window_resizer.cc
index e65f2f4d1512ed37e43db9bc633d40e33a03680c..5dea21ecfd669a025743e2acde468aaf87c77b46 100644
--- a/ash/wm/workspace/workspace_window_resizer.cc
+++ b/ash/wm/workspace/workspace_window_resizer.cc
@@ -21,6 +21,7 @@
#include "ash/wm/drag_window_resizer.h"
#include "ash/wm/panels/panel_window_resizer.h"
#include "ash/wm/window_state.h"
+#include "ash/wm/window_state_aura.h"
#include "ash/wm/window_util.h"
#include "ash/wm/wm_event.h"
#include "ash/wm/workspace/phantom_window_controller.h"
@@ -81,8 +82,7 @@ std::unique_ptr<WindowResizer> CreateWindowResizer(
if (bounds_change == WindowResizer::kBoundsChangeDirection_None)
return std::unique_ptr<WindowResizer>();
- window_state->CreateDragDetails(window, point_in_parent, window_component,
- source);
+ window_state->CreateDragDetails(point_in_parent, window_component, source);
if (window->parent() &&
(window->parent()->id() == kShellWindowId_DefaultContainer ||
window->parent()->id() == kShellWindowId_DockedContainer ||
@@ -764,15 +764,14 @@ bool WorkspaceWindowResizer::UpdateMagnetismWindow(const gfx::Rect& bounds,
for (aura::Window::Windows::const_reverse_iterator i = children.rbegin();
i != children.rend() && !matcher.AreEdgesObscured(); ++i) {
wm::WindowState* other_state = wm::GetWindowState(*i);
- if (other_state->window() == GetTarget() ||
+ if (other_state->aura_window() == GetTarget() ||
!other_state->window()->IsVisible() ||
- !other_state->IsNormalOrSnapped() ||
- !other_state->CanResize()) {
+ !other_state->IsNormalOrSnapped() || !other_state->CanResize()) {
continue;
}
if (matcher.ShouldAttach(
other_state->window()->GetBoundsInScreen(), &magnetism_edge_)) {
- magnetism_window_ = other_state->window();
+ magnetism_window_ = other_state->aura_window();
window_tracker_.Add(magnetism_window_);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698