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

Side by Side Diff: trunk/src/ash/wm/drag_window_resizer.cc

Issue 59153004: Revert 233787 "Eliminate Shell::RootWindowList in favor of aura:..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
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/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
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
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
OLDNEW
« no previous file with comments | « trunk/src/ash/wm/dock/docked_window_resizer_unittest.cc ('k') | trunk/src/ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698