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

Side by Side Diff: ash/wm/workspace/phantom_window_controller.cc

Issue 64933002: Eliminate Shell::RootWindowList in favor of aura::Window::Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
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/workspace/phantom_window_controller.h" 5 #include "ash/wm/workspace/phantom_window_controller.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/shell_window_ids.h" 8 #include "ash/shell_window_ids.h"
9 #include "ash/wm/coordinate_conversion.h" 9 #include "ash/wm/coordinate_conversion.h"
10 #include "third_party/skia/include/core/SkCanvas.h" 10 #include "third_party/skia/include/core/SkCanvas.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 phantom_widget_ = NULL; 117 phantom_widget_ = NULL;
118 } 118 }
119 if (!phantom_widget_) 119 if (!phantom_widget_)
120 phantom_widget_ = CreatePhantomWidget(target_root, start_bounds_); 120 phantom_widget_ = CreatePhantomWidget(target_root, start_bounds_);
121 121
122 // Create a secondary widget in a second screen if start_bounds_ lie at least 122 // Create a secondary widget in a second screen if start_bounds_ lie at least
123 // partially in that other screen. This allows animations to start or restart 123 // partially in that other screen. This allows animations to start or restart
124 // in one root window and progress into another root. 124 // in one root window and progress into another root.
125 aura::Window* start_root = wm::GetRootWindowMatching(start_bounds_); 125 aura::Window* start_root = wm::GetRootWindowMatching(start_bounds_);
126 if (start_root == target_root) { 126 if (start_root == target_root) {
127 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 127 aura::Window::Windows root_windows = Shell::GetAllRootWindows();
128 for (size_t i = 0; i < root_windows.size(); ++i) { 128 for (size_t i = 0; i < root_windows.size(); ++i) {
129 if (root_windows[i] != target_root && 129 if (root_windows[i] != target_root &&
130 root_windows[i]->GetBoundsInScreen().Intersects(start_bounds_)) { 130 root_windows[i]->GetBoundsInScreen().Intersects(start_bounds_)) {
131 start_root = root_windows[i]; 131 start_root = root_windows[i];
132 break; 132 break;
133 } 133 }
134 } 134 }
135 } 135 }
136 if (phantom_widget_start_ && 136 if (phantom_widget_start_ &&
137 (phantom_widget_start_->GetNativeWindow()->GetRootWindow() != start_root 137 (phantom_widget_start_->GetNativeWindow()->GetRootWindow() != start_root
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 // Fade the window in. 205 // Fade the window in.
206 ui::Layer* widget_layer = phantom_widget->GetNativeWindow()->layer(); 206 ui::Layer* widget_layer = phantom_widget->GetNativeWindow()->layer();
207 widget_layer->SetOpacity(0); 207 widget_layer->SetOpacity(0);
208 ui::ScopedLayerAnimationSettings scoped_setter(widget_layer->GetAnimator()); 208 ui::ScopedLayerAnimationSettings scoped_setter(widget_layer->GetAnimator());
209 widget_layer->SetOpacity(1); 209 widget_layer->SetOpacity(1);
210 return phantom_widget; 210 return phantom_widget;
211 } 211 }
212 212
213 } // namespace internal 213 } // namespace internal
214 } // namespace ash 214 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698