OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/dock/docked_window_resizer.h" | 5 #include "ash/wm/dock/docked_window_resizer.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/display/display_controller.h" | 8 #include "ash/display/display_controller.h" |
9 #include "ash/launcher/launcher.h" | 9 #include "ash/launcher/launcher.h" |
10 #include "ash/root_window_controller.h" | 10 #include "ash/root_window_controller.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 namespace ash { | 35 namespace ash { |
36 namespace internal { | 36 namespace internal { |
37 | 37 |
38 namespace { | 38 namespace { |
39 | 39 |
40 DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint( | 40 DockedWindowLayoutManager* GetDockedLayoutManagerAtPoint( |
41 const gfx::Point& point) { | 41 const gfx::Point& point) { |
42 gfx::Display display = ScreenAsh::FindDisplayContainingPoint(point); | 42 gfx::Display display = ScreenAsh::FindDisplayContainingPoint(point); |
43 if (!display.is_valid()) | 43 if (!display.is_valid()) |
44 return NULL; | 44 return NULL; |
45 aura::RootWindow* root = Shell::GetInstance()->display_controller()-> | 45 aura::Window* root = Shell::GetInstance()->display_controller()-> |
46 GetRootWindowForDisplayId(display.id()); | 46 GetRootWindowForDisplayId(display.id()); |
47 aura::Window* dock_container = Shell::GetContainer( | 47 aura::Window* dock_container = Shell::GetContainer( |
48 root, kShellWindowId_DockedContainer); | 48 root, kShellWindowId_DockedContainer); |
49 return static_cast<DockedWindowLayoutManager*>( | 49 return static_cast<DockedWindowLayoutManager*>( |
50 dock_container->layout_manager()); | 50 dock_container->layout_manager()); |
51 } | 51 } |
52 | 52 |
53 } // namespace | 53 } // namespace |
54 | 54 |
55 DockedWindowResizer::~DockedWindowResizer() { | 55 DockedWindowResizer::~DockedWindowResizer() { |
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 // If we started the drag in one root window and moved into another root | 289 // If we started the drag in one root window and moved into another root |
290 // but then canceled the drag we may need to inform the original layout | 290 // but then canceled the drag we may need to inform the original layout |
291 // manager that the drag is finished. | 291 // manager that the drag is finished. |
292 if (initial_dock_layout_ != dock_layout_) | 292 if (initial_dock_layout_ != dock_layout_) |
293 initial_dock_layout_->FinishDragging(); | 293 initial_dock_layout_->FinishDragging(); |
294 is_docked_ = false; | 294 is_docked_ = false; |
295 } | 295 } |
296 | 296 |
297 } // namespace internal | 297 } // namespace internal |
298 } // namespace ash | 298 } // namespace ash |
OLD | NEW |