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

Side by Side Diff: ash/wm/toplevel_window_event_handler.cc

Issue 1913473002: Makes WorkspaceWindowResizer use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@root_controller_observer
Patch Set: fix exo again 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 unified diff | Download patch
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/window_resizer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/toplevel_window_event_handler.h" 5 #include "ash/wm/toplevel_window_event_handler.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/wm/aura/wm_window_aura.h"
8 #include "ash/wm/common/wm_event.h" 9 #include "ash/wm/common/wm_event.h"
9 #include "ash/wm/resize_shadow_controller.h" 10 #include "ash/wm/resize_shadow_controller.h"
10 #include "ash/wm/window_resizer.h" 11 #include "ash/wm/window_resizer.h"
11 #include "ash/wm/window_state.h" 12 #include "ash/wm/window_state.h"
12 #include "ash/wm/window_state_aura.h" 13 #include "ash/wm/window_state_aura.h"
13 #include "ash/wm/window_state_observer.h" 14 #include "ash/wm/window_state_observer.h"
14 #include "ash/wm/window_util.h" 15 #include "ash/wm/window_util.h"
15 #include "base/message_loop/message_loop.h" 16 #include "base/message_loop/message_loop.h"
16 #include "base/run_loop.h" 17 #include "base/run_loop.h"
17 #include "ui/aura/client/cursor_client.h" 18 #include "ui/aura/client/cursor_client.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 CompleteDrag(DRAG_REVERT); 445 CompleteDrag(DRAG_REVERT);
445 } 446 }
446 447
447 bool ToplevelWindowEventHandler::AttemptToStartDrag( 448 bool ToplevelWindowEventHandler::AttemptToStartDrag(
448 aura::Window* window, 449 aura::Window* window,
449 const gfx::Point& point_in_parent, 450 const gfx::Point& point_in_parent,
450 int window_component, 451 int window_component,
451 aura::client::WindowMoveSource source) { 452 aura::client::WindowMoveSource source) {
452 if (window_resizer_.get()) 453 if (window_resizer_.get())
453 return false; 454 return false;
454 WindowResizer* resizer = CreateWindowResizer(window, point_in_parent, 455 WindowResizer* resizer =
455 window_component, source).release(); 456 CreateWindowResizer(wm::WmWindowAura::Get(window), point_in_parent,
457 window_component, source)
458 .release();
456 if (!resizer) 459 if (!resizer)
457 return false; 460 return false;
458 461
459 window_resizer_.reset(new ScopedWindowResizer(this, resizer)); 462 window_resizer_.reset(new ScopedWindowResizer(this, resizer));
460 463
461 pre_drag_window_bounds_ = window->bounds(); 464 pre_drag_window_bounds_ = window->bounds();
462 in_gesture_drag_ = (source == aura::client::WINDOW_MOVE_SOURCE_TOUCH); 465 in_gesture_drag_ = (source == aura::client::WINDOW_MOVE_SOURCE_TOUCH);
463 return true; 466 return true;
464 } 467 }
465 468
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 default: 632 default:
630 NOTREACHED(); 633 NOTREACHED();
631 } 634 }
632 } 635 }
633 636
634 void ToplevelWindowEventHandler::ResizerWindowDestroyed() { 637 void ToplevelWindowEventHandler::ResizerWindowDestroyed() {
635 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED); 638 CompleteDrag(DRAG_RESIZER_WINDOW_DESTROYED);
636 } 639 }
637 640
638 } // namespace ash 641 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/panels/panel_window_resizer_unittest.cc ('k') | ash/wm/window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698