| 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/drag_window_resizer.h" | 5 #include "ash/wm/drag_window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/display/mouse_cursor_event_filter.h" | 7 #include "ash/display/mouse_cursor_event_filter.h" |
| 8 #include "ash/root_window_controller.h" | 8 #include "ash/root_window_controller.h" |
| 9 #include "ash/screen_ash.h" | 9 #include "ash/screen_ash.h" |
| 10 #include "ash/shell.h" | 10 #include "ash/shell.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 // The opacity of the window when dragging it over a user item in the tray. | 34 // The opacity of the window when dragging it over a user item in the tray. |
| 35 const float kOpacityWhenDraggedOverUserIcon = 0.4f; | 35 const float kOpacityWhenDraggedOverUserIcon = 0.4f; |
| 36 | 36 |
| 37 // Returns true if Ash has more than one root window. | 37 // Returns true if Ash has more than one root window. |
| 38 bool HasSecondaryRootWindow() { | 38 bool HasSecondaryRootWindow() { |
| 39 return Shell::GetAllRootWindows().size() > 1; | 39 return Shell::GetAllRootWindows().size() > 1; |
| 40 } | 40 } |
| 41 | 41 |
| 42 // When there are two root windows, returns one of the root windows which is not | 42 // When there are two root windows, returns one of the root windows which is not |
| 43 // |root_window|. Returns NULL if only one root window exists. | 43 // |root_window|. Returns NULL if only one root window exists. |
| 44 aura::Window* GetAnotherRootWindow(aura::Window* root_window) { | 44 aura::RootWindow* GetAnotherRootWindow(aura::Window* root_window) { |
| 45 aura::Window::Windows root_windows = Shell::GetAllRootWindows(); | 45 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); |
| 46 if (root_windows.size() < 2) | 46 if (root_windows.size() < 2) |
| 47 return NULL; | 47 return NULL; |
| 48 DCHECK_EQ(2U, root_windows.size()); | 48 DCHECK_EQ(2U, root_windows.size()); |
| 49 if (root_windows[0] == root_window) | 49 if (root_windows[0] == root_window) |
| 50 return root_windows[1]; | 50 return root_windows[1]; |
| 51 return root_windows[0]; | 51 return root_windows[0]; |
| 52 } | 52 } |
| 53 | 53 |
| 54 } // namespace | 54 } // namespace |
| 55 | 55 |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 if (!tray_user->TransferWindowToUser(details_.window)) { | 268 if (!tray_user->TransferWindowToUser(details_.window)) { |
| 269 GetTarget()->layer()->SetOpacity(old_opacity); | 269 GetTarget()->layer()->SetOpacity(old_opacity); |
| 270 return false; | 270 return false; |
| 271 } | 271 } |
| 272 RevertDrag(); | 272 RevertDrag(); |
| 273 return true; | 273 return true; |
| 274 } | 274 } |
| 275 | 275 |
| 276 } // namespace internal | 276 } // namespace internal |
| 277 } // namespace ash | 277 } // namespace ash |
| OLD | NEW |