OLD | NEW |
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/default_window_resizer.h" | 5 #include "ash/wm/default_window_resizer.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/wm/cursor_manager.h" |
8 #include "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
9 #include "ui/aura/cursor_manager.h" | |
10 #include "ui/aura/env.h" | 10 #include "ui/aura/env.h" |
11 #include "ui/aura/root_window.h" | 11 #include "ui/aura/root_window.h" |
12 #include "ui/aura/window.h" | 12 #include "ui/aura/window.h" |
13 #include "ui/aura/window_delegate.h" | 13 #include "ui/aura/window_delegate.h" |
14 #include "ui/base/hit_test.h" | 14 #include "ui/base/hit_test.h" |
15 #include "ui/base/ui_base_types.h" | 15 #include "ui/base/ui_base_types.h" |
16 #include "ui/compositor/layer.h" | 16 #include "ui/compositor/layer.h" |
17 #include "ui/compositor/scoped_layer_animation_settings.h" | 17 #include "ui/compositor/scoped_layer_animation_settings.h" |
18 #include "ui/gfx/screen.h" | 18 #include "ui/gfx/screen.h" |
19 | 19 |
20 namespace ash { | 20 namespace ash { |
21 | 21 |
22 DefaultWindowResizer::~DefaultWindowResizer() { | 22 DefaultWindowResizer::~DefaultWindowResizer() { |
23 aura::Env::GetInstance()->cursor_manager()->UnlockCursor(); | 23 ash::Shell::GetInstance()->cursor_manager()->UnlockCursor(); |
24 } | 24 } |
25 | 25 |
26 // static | 26 // static |
27 DefaultWindowResizer* | 27 DefaultWindowResizer* |
28 DefaultWindowResizer::Create(aura::Window* window, | 28 DefaultWindowResizer::Create(aura::Window* window, |
29 const gfx::Point& location, | 29 const gfx::Point& location, |
30 int window_component) { | 30 int window_component) { |
31 Details details(window, location, window_component); | 31 Details details(window, location, window_component); |
32 return details.is_resizable ? new DefaultWindowResizer(details) : NULL; | 32 return details.is_resizable ? new DefaultWindowResizer(details) : NULL; |
33 } | 33 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 if (!did_move_or_resize_) | 69 if (!did_move_or_resize_) |
70 return; | 70 return; |
71 | 71 |
72 details_.window->SetBounds(details_.initial_bounds); | 72 details_.window->SetBounds(details_.initial_bounds); |
73 } | 73 } |
74 | 74 |
75 DefaultWindowResizer::DefaultWindowResizer(const Details& details) | 75 DefaultWindowResizer::DefaultWindowResizer(const Details& details) |
76 : details_(details), | 76 : details_(details), |
77 did_move_or_resize_(false) { | 77 did_move_or_resize_(false) { |
78 DCHECK(details_.is_resizable); | 78 DCHECK(details_.is_resizable); |
79 aura::Env::GetInstance()->cursor_manager()->LockCursor(); | 79 ash::Shell::GetInstance()->cursor_manager()->LockCursor(); |
80 } | 80 } |
81 | 81 |
82 } // namespace aura | 82 } // namespace aura |
OLD | NEW |