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 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 tray_->AddTrayItem(new internal::TraySettings()); | 631 tray_->AddTrayItem(new internal::TraySettings()); |
632 tray_->AddTrayItem(tray_date); | 632 tray_->AddTrayItem(tray_date); |
633 tray_->AddTrayItem(tray_accessibility); | 633 tray_->AddTrayItem(tray_accessibility); |
634 tray_->AddTrayItem(tray_caps_lock); | 634 tray_->AddTrayItem(tray_caps_lock); |
635 } | 635 } |
636 if (!status_widget_) | 636 if (!status_widget_) |
637 status_widget_ = internal::CreateStatusArea(tray_.get()); | 637 status_widget_ = internal::CreateStatusArea(tray_.get()); |
638 | 638 |
639 // This controller needs to be set before SetupManagedWindowMode. | 639 // This controller needs to be set before SetupManagedWindowMode. |
640 desktop_background_controller_.reset(new DesktopBackgroundController); | 640 desktop_background_controller_.reset(new DesktopBackgroundController); |
| 641 if (delegate_.get()) |
| 642 user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate()); |
641 | 643 |
642 InitLayoutManagers(); | 644 InitLayoutManagers(); |
643 | 645 |
644 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { | 646 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { |
645 resize_shadow_controller_.reset(new internal::ResizeShadowController()); | 647 resize_shadow_controller_.reset(new internal::ResizeShadowController()); |
646 shadow_controller_.reset(new internal::ShadowController()); | 648 shadow_controller_.reset(new internal::ShadowController()); |
647 } | 649 } |
648 | 650 |
649 focus_cycler_.reset(new internal::FocusCycler()); | 651 focus_cycler_.reset(new internal::FocusCycler()); |
650 focus_cycler_->AddWidget(status_widget_); | 652 focus_cycler_->AddWidget(status_widget_); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
791 GetContainer(internal::kShellWindowId_StatusContainer)-> | 793 GetContainer(internal::kShellWindowId_StatusContainer)-> |
792 SetLayoutManager(status_area_layout_manager); | 794 SetLayoutManager(status_area_layout_manager); |
793 | 795 |
794 aura::Window* default_container = | 796 aura::Window* default_container = |
795 GetContainer(internal::kShellWindowId_DefaultContainer); | 797 GetContainer(internal::kShellWindowId_DefaultContainer); |
796 // Workspace manager has its own layout managers. | 798 // Workspace manager has its own layout managers. |
797 workspace_controller_.reset( | 799 workspace_controller_.reset( |
798 new internal::WorkspaceController(default_container)); | 800 new internal::WorkspaceController(default_container)); |
799 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); | 801 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); |
800 | 802 |
801 // Create the desktop background image. | 803 // Create desktop background widget. |
802 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); | 804 // TODO(bshe): We should be able to use OnDesktopBackgroundChanged function |
| 805 // here after issue 117244 got fixed. |
| 806 desktop_background_controller_->SetDesktopBackgroundImageMode( |
| 807 GetWallpaper(user_wallpaper_delegate_->GetUserWallpaperIndex())); |
803 } | 808 } |
804 | 809 |
805 void Shell::DisableWorkspaceGridLayout() { | 810 void Shell::DisableWorkspaceGridLayout() { |
806 if (workspace_controller_.get()) | 811 if (workspace_controller_.get()) |
807 workspace_controller_->workspace_manager()->set_grid_size(0); | 812 workspace_controller_->workspace_manager()->set_grid_size(0); |
808 } | 813 } |
809 | 814 |
810 } // namespace ash | 815 } // namespace ash |
OLD | NEW |