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

Side by Side Diff: ash/common/wm/default_window_resizer.cc

Issue 2035543004: Shuffles and renames ash/common/wm classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: random changes for chrome tests Created 4 years, 6 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
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/common/wm/default_window_resizer.h" 5 #include "ash/common/wm/default_window_resizer.h"
6 6
7 #include "ash/common/wm/window_state.h" 7 #include "ash/common/wm/window_state.h"
8 #include "ash/common/wm/wm_globals.h" 8 #include "ash/common/wm_shell.h"
9 #include "ash/common/wm/wm_window.h" 9 #include "ash/common/wm_window.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 DefaultWindowResizer::~DefaultWindowResizer() { 13 DefaultWindowResizer::~DefaultWindowResizer() {
14 globals_->UnlockCursor(); 14 shell_->UnlockCursor();
15 } 15 }
16 16
17 // static 17 // static
18 DefaultWindowResizer* DefaultWindowResizer::Create( 18 DefaultWindowResizer* DefaultWindowResizer::Create(
19 wm::WindowState* window_state) { 19 wm::WindowState* window_state) {
20 return new DefaultWindowResizer(window_state); 20 return new DefaultWindowResizer(window_state);
21 } 21 }
22 22
23 void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) { 23 void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
24 gfx::Rect bounds(CalculateBoundsForDrag(location)); 24 gfx::Rect bounds(CalculateBoundsForDrag(location));
(...skipping 13 matching lines...) Expand all
38 38
39 GetTarget()->SetBounds(details().initial_bounds_in_parent); 39 GetTarget()->SetBounds(details().initial_bounds_in_parent);
40 40
41 if (!details().restore_bounds.IsEmpty()) 41 if (!details().restore_bounds.IsEmpty())
42 window_state_->SetRestoreBoundsInScreen(details().restore_bounds); 42 window_state_->SetRestoreBoundsInScreen(details().restore_bounds);
43 } 43 }
44 44
45 DefaultWindowResizer::DefaultWindowResizer(wm::WindowState* window_state) 45 DefaultWindowResizer::DefaultWindowResizer(wm::WindowState* window_state)
46 : WindowResizer(window_state), 46 : WindowResizer(window_state),
47 did_move_or_resize_(false), 47 did_move_or_resize_(false),
48 globals_(GetTarget()->GetGlobals()) { 48 shell_(GetTarget()->GetShell()) {
49 DCHECK(details().is_resizable); 49 DCHECK(details().is_resizable);
50 globals_->LockCursor(); 50 shell_->LockCursor();
51 } 51 }
52 52
53 } // namespace aura 53 } // namespace aura
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698