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

Side by Side Diff: ash/shell.cc

Issue 9764012: Restore to user selected wallpaper after browser crash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review and fix a segfault when starting chrome after saving data to local state. Created 8 years, 9 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/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
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());
601 603
602 InitLayoutManagers(); 604 InitLayoutManagers();
603 605
604 if (!command_line->HasSwitch(switches::kAuraNoShadows)) { 606 if (!command_line->HasSwitch(switches::kAuraNoShadows)) {
605 resize_shadow_controller_.reset(new internal::ResizeShadowController()); 607 resize_shadow_controller_.reset(new internal::ResizeShadowController());
606 shadow_controller_.reset(new internal::ShadowController()); 608 shadow_controller_.reset(new internal::ShadowController());
607 } 609 }
608 610
609 focus_cycler_.reset(new internal::FocusCycler()); 611 focus_cycler_.reset(new internal::FocusCycler());
610 focus_cycler_->AddWidget(status_widget_); 612 focus_cycler_->AddWidget(status_widget_);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 aura::Window* default_container = 748 aura::Window* default_container =
747 GetContainer(internal::kShellWindowId_DefaultContainer); 749 GetContainer(internal::kShellWindowId_DefaultContainer);
748 // Workspace manager has its own layout managers. 750 // Workspace manager has its own layout managers.
749 workspace_controller_.reset( 751 workspace_controller_.reset(
750 new internal::WorkspaceController(default_container)); 752 new internal::WorkspaceController(default_container));
751 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager); 753 workspace_controller_->workspace_manager()->set_shelf(shelf_layout_manager);
752 754
753 // Ensure launcher is visible. 755 // Ensure launcher is visible.
754 launcher_->widget()->Show(); 756 launcher_->widget()->Show();
755 757
756 // Create the desktop background image. 758 // Create desktop background widget.
757 desktop_background_controller_->SetDefaultDesktopBackgroundImage(); 759 // TODO(bshe): We should be able to use OnDesktopBackgroundChanged function
760 // here after issue 117244 got fixed.
761 desktop_background_controller_->SetDesktopBackgroundImageMode(
762 GetWallpaper(user_wallpaper_delegate_->GetUserWallpaperIndex()));
758 } 763 }
759 764
760 void Shell::DisableWorkspaceGridLayout() { 765 void Shell::DisableWorkspaceGridLayout() {
761 if (workspace_controller_.get()) 766 if (workspace_controller_.get())
762 workspace_controller_->workspace_manager()->set_grid_size(0); 767 workspace_controller_->workspace_manager()->set_grid_size(0);
763 } 768 }
764 769
765 } // namespace ash 770 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698