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

Side by Side Diff: ash/root_window_controller.cc

Issue 10829173: Revert 149869 because it broke ash_unittests on win_aura and linux_chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months 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
« no previous file with comments | « ash/desktop_background/desktop_background_widget_controller.cc ('k') | ash/shell_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "ash/desktop_background/desktop_background_widget_controller.h"
10 #include "ash/display/display_controller.h" 9 #include "ash/display/display_controller.h"
11 #include "ash/shell.h" 10 #include "ash/shell.h"
12 #include "ash/shell_factory.h" 11 #include "ash/shell_factory.h"
13 #include "ash/shell_window_ids.h" 12 #include "ash/shell_window_ids.h"
14 #include "ash/wm/base_layout_manager.h" 13 #include "ash/wm/base_layout_manager.h"
15 #include "ash/wm/event_client_impl.h" 14 #include "ash/wm/event_client_impl.h"
16 #include "ash/wm/property_util.h" 15 #include "ash/wm/property_util.h"
17 #include "ash/wm/root_window_layout_manager.h" 16 #include "ash/wm/root_window_layout_manager.h"
18 #include "ash/wm/screen_dimmer.h" 17 #include "ash/wm/screen_dimmer.h"
19 #include "ash/wm/system_modal_container_layout_manager.h" 18 #include "ash/wm/system_modal_container_layout_manager.h"
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 new internal::SystemModalContainerLayoutManager(modal_container)); 162 new internal::SystemModalContainerLayoutManager(modal_container));
164 SetChildWindowVisibilityChangesAnimated(modal_container); 163 SetChildWindowVisibilityChangesAnimated(modal_container);
165 SetUsesScreenCoordinates(modal_container); 164 SetUsesScreenCoordinates(modal_container);
166 165
167 aura::Window* input_method_container = CreateContainer( 166 aura::Window* input_method_container = CreateContainer(
168 internal::kShellWindowId_InputMethodContainer, 167 internal::kShellWindowId_InputMethodContainer,
169 "InputMethodContainer", 168 "InputMethodContainer",
170 non_lock_screen_containers); 169 non_lock_screen_containers);
171 SetUsesScreenCoordinates(input_method_container); 170 SetUsesScreenCoordinates(input_method_container);
172 171
173 aura::Window* lock_background_containers = CreateContainer(
174 internal::kShellWindowId_LockScreenBackgroundContainer,
175 "LockScreenBackgroundContainer",
176 lock_screen_containers);
177
178 SetChildWindowVisibilityChangesAnimated(lock_background_containers);
179
180 // TODO(beng): Figure out if we can make this use 172 // TODO(beng): Figure out if we can make this use
181 // SystemModalContainerEventFilter instead of stops_event_propagation. 173 // SystemModalContainerEventFilter instead of stops_event_propagation.
182 aura::Window* lock_container = CreateContainer( 174 aura::Window* lock_container = CreateContainer(
183 internal::kShellWindowId_LockScreenContainer, 175 internal::kShellWindowId_LockScreenContainer,
184 "LockScreenContainer", 176 "LockScreenContainer",
185 lock_screen_containers); 177 lock_screen_containers);
186 lock_container->SetLayoutManager( 178 lock_container->SetLayoutManager(
187 new internal::BaseLayoutManager(root_window)); 179 new internal::BaseLayoutManager(root_window));
188 SetUsesScreenCoordinates(lock_container); 180 SetUsesScreenCoordinates(lock_container);
189 // TODO(beng): stopsevents 181 // TODO(beng): stopsevents
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
279 new internal::BaseLayoutManager( 271 new internal::BaseLayoutManager(
280 always_on_top_container->GetRootWindow())); 272 always_on_top_container->GetRootWindow()));
281 } 273 }
282 274
283 void RootWindowController::CreateContainers() { 275 void RootWindowController::CreateContainers() {
284 CreateContainersInRootWindow(root_window_.get()); 276 CreateContainersInRootWindow(root_window_.get());
285 } 277 }
286 278
287 void RootWindowController::CloseChildWindows() { 279 void RootWindowController::CloseChildWindows() {
288 // Close background widget first as it depends on tooltip. 280 // Close background widget first as it depends on tooltip.
289 root_window_->SetProperty(kWindowDesktopComponent, 281 root_window_layout_->SetBackgroundWidget(NULL);
290 static_cast<DesktopBackgroundWidgetController*>(NULL));
291
292 workspace_controller_.reset(); 282 workspace_controller_.reset();
293 aura::client::SetTooltipClient(root_window_.get(), NULL); 283 aura::client::SetTooltipClient(root_window_.get(), NULL);
294 284
295 while (!root_window_->children().empty()) { 285 while (!root_window_->children().empty()) {
296 aura::Window* child = root_window_->children()[0]; 286 aura::Window* child = root_window_->children()[0];
297 delete child; 287 delete child;
298 } 288 }
299 } 289 }
300 290
301 bool RootWindowController::IsInMaximizedMode() const { 291 bool RootWindowController::IsInMaximizedMode() const {
(...skipping 21 matching lines...) Expand all
323 // Restore focused or active window if it's still alive. 313 // Restore focused or active window if it's still alive.
324 if (focused && tracker.Contains(focused) && dst->Contains(focused)) { 314 if (focused && tracker.Contains(focused) && dst->Contains(focused)) {
325 dst->GetFocusManager()->SetFocusedWindow(focused, NULL); 315 dst->GetFocusManager()->SetFocusedWindow(focused, NULL);
326 } else if (active && tracker.Contains(active) && dst->Contains(active)) { 316 } else if (active && tracker.Contains(active) && dst->Contains(active)) {
327 activation_client->ActivateWindow(active); 317 activation_client->ActivateWindow(active);
328 } 318 }
329 } 319 }
330 320
331 } // namespace internal 321 } // namespace internal
332 } // namespace ash 322 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_widget_controller.cc ('k') | ash/shell_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698