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

Unified Diff: ash/common/wm/workspace/multi_window_resize_controller.cc

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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/common/wm/workspace/multi_window_resize_controller.cc
diff --git a/ash/common/wm/workspace/multi_window_resize_controller.cc b/ash/common/wm/workspace/multi_window_resize_controller.cc
index a96fec8adc335ed7ff4e847c5ff589854daeebe1..dfeb77f8c3b2f124987a0ae6ace1f7e42ee6c54a 100644
--- a/ash/common/wm/workspace/multi_window_resize_controller.cc
+++ b/ash/common/wm/workspace/multi_window_resize_controller.cc
@@ -170,8 +170,8 @@ void MultiWindowResizeController::Show(WmWindow* window,
}
windows_ = windows;
- windows_.window1->AddObserver(this);
- windows_.window2->AddObserver(this);
+ windows_.window1->aura_window()->AddObserver(this);
+ windows_.window2->aura_window()->AddObserver(this);
show_location_in_parent_ =
window->ConvertPointToTarget(window->GetParent(), point_in_window);
show_timer_.Start(FROM_HERE, base::TimeDelta::FromMilliseconds(kShowDelayMS),
@@ -184,11 +184,11 @@ void MultiWindowResizeController::Hide() {
return; // Ignore hides while actively resizing.
if (windows_.window1) {
- windows_.window1->RemoveObserver(this);
+ windows_.window1->aura_window()->RemoveObserver(this);
windows_.window1 = NULL;
}
if (windows_.window2) {
- windows_.window2->RemoveObserver(this);
+ windows_.window2->aura_window()->RemoveObserver(this);
windows_.window2 = NULL;
}
@@ -198,7 +198,7 @@ void MultiWindowResizeController::Hide() {
return;
for (size_t i = 0; i < windows_.other_windows.size(); ++i)
- windows_.other_windows[i]->RemoveObserver(this);
+ windows_.other_windows[i]->aura_window()->RemoveObserver(this);
mouse_watcher_.reset();
resize_widget_.reset();
windows_ = ResizeWindows();
@@ -208,7 +208,7 @@ void MultiWindowResizeController::MouseMovedOutOfHost() {
Hide();
}
-void MultiWindowResizeController::OnWindowDestroying(WmWindow* window) {
+void MultiWindowResizeController::OnWindowDestroying(aura::Window* window) {
// Have to explicitly reset the WindowResizer, otherwise Hide() does nothing.
window_resizer_.reset();
Hide();
@@ -411,7 +411,7 @@ void MultiWindowResizeController::StartResize(
FindWindowsTouching(windows_.window2, windows_.direction,
&windows_.other_windows);
for (size_t i = 0; i < windows_.other_windows.size(); ++i) {
- windows_.other_windows[i]->AddObserver(this);
+ windows_.other_windows[i]->aura_window()->AddObserver(this);
windows.push_back(windows_.other_windows[i]);
}
int component = windows_.direction == LEFT_RIGHT ? HTRIGHT : HTBOTTOM;
@@ -453,7 +453,7 @@ void MultiWindowResizeController::CompleteResize() {
// the |other_windows|. If we start another resize we'll recalculate the
// |other_windows| and invoke AddObserver() as necessary.
for (size_t i = 0; i < windows_.other_windows.size(); ++i)
- windows_.other_windows[i]->RemoveObserver(this);
+ windows_.other_windows[i]->aura_window()->RemoveObserver(this);
windows_.other_windows.clear();
CreateMouseWatcher();
« no previous file with comments | « ash/common/wm/workspace/multi_window_resize_controller.h ('k') | ash/common/wm/workspace/workspace_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698