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

Side by Side Diff: ash/shell.cc

Issue 10459003: Load user custom wallpaper after browser crash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nikita's review Created 8 years, 6 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 #include <string> 8 #include <string>
9 9
10 #include "ash/accelerators/focus_manager_factory.h" 10 #include "ash/accelerators/focus_manager_factory.h"
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 } 226 }
227 227
228 // This dummy class is used for shell unit tests. We dont have chrome delegate 228 // This dummy class is used for shell unit tests. We dont have chrome delegate
229 // in these tests. 229 // in these tests.
230 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { 230 class DummyUserWallpaperDelegate : public UserWallpaperDelegate {
231 public: 231 public:
232 DummyUserWallpaperDelegate() {} 232 DummyUserWallpaperDelegate() {}
233 233
234 virtual ~DummyUserWallpaperDelegate() {} 234 virtual ~DummyUserWallpaperDelegate() {}
235 235
236 virtual const int GetUserWallpaperIndex() OVERRIDE { 236 virtual void SetLoggedInUserWallpaper() OVERRIDE {
237 return -1;
238 } 237 }
239 238
240 virtual void OpenSetWallpaperPage() OVERRIDE { 239 virtual void OpenSetWallpaperPage() OVERRIDE {
241 } 240 }
242 241
243 virtual bool CanOpenSetWallpaperPage() OVERRIDE { 242 virtual bool CanOpenSetWallpaperPage() OVERRIDE {
244 return false; 243 return false;
245 } 244 }
246 245
247 private: 246 private:
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 focus_cycler_->AddWidget(tray_->widget()); 739 focus_cycler_->AddWidget(tray_->widget());
741 740
742 if (!delegate_.get() || delegate_->IsUserLoggedIn()) 741 if (!delegate_.get() || delegate_->IsUserLoggedIn())
743 CreateLauncher(); 742 CreateLauncher();
744 743
745 // Force a layout. 744 // Force a layout.
746 root_window->layout_manager()->OnWindowResized(); 745 root_window->layout_manager()->OnWindowResized();
747 746
748 // It needs to be created after OnWindowResized has been called, otherwise the 747 // It needs to be created after OnWindowResized has been called, otherwise the
749 // widget will not paint when restoring after a browser crash. 748 // widget will not paint when restoring after a browser crash.
750 desktop_background_controller_->SetLoggedInUserWallpaper(); 749 user_wallpaper_delegate_->SetLoggedInUserWallpaper();
751 750
752 window_modality_controller_.reset(new internal::WindowModalityController); 751 window_modality_controller_.reset(new internal::WindowModalityController);
753 AddRootWindowEventFilter(window_modality_controller_.get()); 752 AddRootWindowEventFilter(window_modality_controller_.get());
754 753
755 visibility_controller_.reset(new internal::VisibilityController); 754 visibility_controller_.reset(new internal::VisibilityController);
756 755
757 tooltip_controller_.reset(new internal::TooltipController); 756 tooltip_controller_.reset(new internal::TooltipController);
758 AddRootWindowEventFilter(tooltip_controller_.get()); 757 AddRootWindowEventFilter(tooltip_controller_.get());
759 758
760 drag_drop_controller_.reset(new internal::DragDropController); 759 drag_drop_controller_.reset(new internal::DragDropController);
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 panel_container->SetLayoutManager(panel_layout_manager_); 961 panel_container->SetLayoutManager(panel_layout_manager_);
963 } 962 }
964 } 963 }
965 964
966 void Shell::DisableWorkspaceGridLayout() { 965 void Shell::DisableWorkspaceGridLayout() {
967 if (workspace_controller_.get()) 966 if (workspace_controller_.get())
968 workspace_controller_->workspace_manager()->set_grid_size(0); 967 workspace_controller_->workspace_manager()->set_grid_size(0);
969 } 968 }
970 969
971 } // namespace ash 970 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698