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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "ash/app_list/app_list.h" | 9 #include "ash/app_list/app_list.h" |
10 #include "ash/ash_switches.h" | 10 #include "ash/ash_switches.h" |
(...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
591 } | 591 } |
592 if (!status_widget_) | 592 if (!status_widget_) |
593 status_widget_ = internal::CreateStatusArea(tray_.get()); | 593 status_widget_ = internal::CreateStatusArea(tray_.get()); |
594 | 594 |
595 aura::Window* default_container = | 595 aura::Window* default_container = |
596 GetContainer(internal::kShellWindowId_DefaultContainer); | 596 GetContainer(internal::kShellWindowId_DefaultContainer); |
597 launcher_.reset(new Launcher(default_container)); | 597 launcher_.reset(new Launcher(default_container)); |
598 | 598 |
599 // This controller needs to be set before SetupManagedWindowMode. | 599 // This controller needs to be set before SetupManagedWindowMode. |
600 desktop_background_controller_.reset(new DesktopBackgroundController); | 600 desktop_background_controller_.reset(new DesktopBackgroundController); |
601 if (delegate_.get()) | |
602 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); | |
603 desktop_background_controller_->SetDesktopBackgroundImageMode( | |
604 GetWallpaper(user_wallpaper_delegate_->GetUserWallpaperIndex())); | |
flackr
2012/03/21 17:44:20
Seems this would be equivalent to:
desktop_backgro
bshe
2012/03/22 02:16:03
Yes and no. Ideally, they should be equivalent. Bu
| |
601 | 605 |
602 InitLayoutManagers(); | 606 InitLayoutManagers(); |
603 | 607 |
604 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { | 608 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { |
605 resize_shadow_controller_.reset(new internal::ResizeShadowController()); | 609 resize_shadow_controller_.reset(new internal::ResizeShadowController()); |
606 shadow_controller_.reset(new internal::ShadowController()); | 610 shadow_controller_.reset(new internal::ShadowController()); |
607 } | 611 } |
608 | 612 |
609 focus_cycler_.reset(new internal::FocusCycler()); | 613 focus_cycler_.reset(new internal::FocusCycler()); |
610 focus_cycler_->AddWidget(status_widget_); | 614 focus_cycler_->AddWidget(status_widget_); |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
745 | 749 |
746 aura::Window* default_container = | 750 aura::Window* default_container = |
747 GetContainer(internal::kShellWindowId_DefaultContainer); | 751 GetContainer(internal::kShellWindowId_DefaultContainer); |
748 // Workspace manager has its own layout managers. | 752 // Workspace manager has its own layout managers. |
749 workspace_controller_.reset( | 753 workspace_controller_.reset( |
750 new internal::WorkspaceController(default_container)); | 754 new internal::WorkspaceController(default_container)); |
751 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); | 755 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); |
752 | 756 |
753 // Ensure launcher is visible. | 757 // Ensure launcher is visible. |
754 launcher_->widget()->Show(); | 758 launcher_->widget()->Show(); |
755 | |
756 // Create the desktop background image. | |
757 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); | |
758 } | 759 } |
759 | 760 |
760 void Shell::DisableWorkspaceGridLayout() { | 761 void Shell::DisableWorkspaceGridLayout() { |
761 if (workspace_controller_.get()) | 762 if (workspace_controller_.get()) |
762 workspace_controller_->workspace_manager()->set_grid_size(0); | 763 workspace_controller_->workspace_manager()->set_grid_size(0); |
763 } | 764 } |
764 | 765 |
765 } // namespace ash | 766 } // namespace ash |
OLD | NEW |