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

Side by Side Diff: ash/desktop_background/desktop_background_controller.cc

Issue 24020002: Move GetRootWindowController() to root_window_controller.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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
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/desktop_background/desktop_background_controller.h" 5 #include "ash/desktop_background/desktop_background_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/desktop_background/desktop_background_controller_observer.h" 8 #include "ash/desktop_background/desktop_background_controller_observer.h"
9 #include "ash/desktop_background/desktop_background_view.h" 9 #include "ash/desktop_background/desktop_background_view.h"
10 #include "ash/desktop_background/desktop_background_widget_controller.h" 10 #include "ash/desktop_background/desktop_background_widget_controller.h"
11 #include "ash/desktop_background/user_wallpaper_delegate.h" 11 #include "ash/desktop_background/user_wallpaper_delegate.h"
12 #include "ash/desktop_background/wallpaper_resizer.h" 12 #include "ash/desktop_background/wallpaper_resizer.h"
13 #include "ash/root_window_controller.h" 13 #include "ash/root_window_controller.h"
14 #include "ash/shell.h" 14 #include "ash/shell.h"
15 #include "ash/shell_factory.h" 15 #include "ash/shell_factory.h"
16 #include "ash/shell_window_ids.h" 16 #include "ash/shell_window_ids.h"
17 #include "ash/wm/property_util.h"
18 #include "ash/wm/root_window_layout_manager.h" 17 #include "ash/wm/root_window_layout_manager.h"
19 #include "base/bind.h" 18 #include "base/bind.h"
20 #include "base/command_line.h" 19 #include "base/command_line.h"
21 #include "base/file_util.h" 20 #include "base/file_util.h"
22 #include "base/logging.h" 21 #include "base/logging.h"
23 #include "base/synchronization/cancellation_flag.h" 22 #include "base/synchronization/cancellation_flag.h"
24 #include "base/threading/worker_pool.h" 23 #include "base/threading/worker_pool.h"
25 #include "content/public/browser/browser_thread.h" 24 #include "content/public/browser/browser_thread.h"
26 #include "grit/ash_resources.h" 25 #include "grit/ash_resources.h"
27 #include "ui/aura/root_window.h" 26 #include "ui/aura/root_window.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 ui::Layer* layer = SetColorLayerForContainer(background_color_, 406 ui::Layer* layer = SetColorLayerForContainer(background_color_,
408 root_window, 407 root_window,
409 container_id); 408 container_id);
410 component = new internal::DesktopBackgroundWidgetController(layer); 409 component = new internal::DesktopBackgroundWidgetController(layer);
411 break; 410 break;
412 } 411 }
413 case BACKGROUND_NONE: 412 case BACKGROUND_NONE:
414 NOTREACHED(); 413 NOTREACHED();
415 return; 414 return;
416 } 415 }
417 GetRootWindowController(root_window)->SetAnimatingWallpaperController( 416 internal::GetRootWindowController(root_window)->
418 new internal::AnimatingDesktopController(component)); 417 SetAnimatingWallpaperController(
418 new internal::AnimatingDesktopController(component));
419 419
420 component->StartAnimating(GetRootWindowController(root_window)); 420 component->StartAnimating(internal::GetRootWindowController(root_window));
421 } 421 }
422 422
423 void DesktopBackgroundController::InstallDesktopControllerForAllWindows() { 423 void DesktopBackgroundController::InstallDesktopControllerForAllWindows() {
424 Shell::RootWindowList root_windows = Shell::GetAllRootWindows(); 424 Shell::RootWindowList root_windows = Shell::GetAllRootWindows();
425 for (Shell::RootWindowList::iterator iter = root_windows.begin(); 425 for (Shell::RootWindowList::iterator iter = root_windows.begin();
426 iter != root_windows.end(); ++iter) { 426 iter != root_windows.end(); ++iter) {
427 InstallDesktopController(*iter); 427 InstallDesktopController(*iter);
428 } 428 }
429 } 429 }
430 430
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 465 }
466 return moved; 466 return moved;
467 } 467 }
468 468
469 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { 469 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) {
470 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : 470 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer :
471 internal::kShellWindowId_DesktopBackgroundContainer; 471 internal::kShellWindowId_DesktopBackgroundContainer;
472 } 472 }
473 473
474 } // namespace ash 474 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/desktop_background/desktop_background_view.cc » ('j') | ash/root_window_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698