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

Side by Side Diff: ash/shell.cc

Issue 10207030: Asynchronously load wallpapers when user pod is selected. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits Created 8 years, 7 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 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 223
224 // This dummy class is used for shell unit tests. We dont have chrome delegate 224 // This dummy class is used for shell unit tests. We dont have chrome delegate
225 // in these tests. 225 // in these tests.
226 class DummyUserWallpaperDelegate : public UserWallpaperDelegate { 226 class DummyUserWallpaperDelegate : public UserWallpaperDelegate {
227 public: 227 public:
228 DummyUserWallpaperDelegate() {} 228 DummyUserWallpaperDelegate() {}
229 229
230 virtual ~DummyUserWallpaperDelegate() {} 230 virtual ~DummyUserWallpaperDelegate() {}
231 231
232 virtual const int GetUserWallpaperIndex() OVERRIDE { 232 virtual const int GetUserWallpaperIndex() OVERRIDE {
233 return 0; 233 return -1;
234 } 234 }
235 235
236 virtual void OpenSetWallpaperPage() OVERRIDE { 236 virtual void OpenSetWallpaperPage() OVERRIDE {
237 } 237 }
238 238
239 virtual bool CanOpenSetWallpaperPage() OVERRIDE { 239 virtual bool CanOpenSetWallpaperPage() OVERRIDE {
240 return false; 240 return false;
241 } 241 }
242 242
243 private: 243 private:
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
716 focus_cycler_->AddWidget(tray_->widget()); 716 focus_cycler_->AddWidget(tray_->widget());
717 717
718 if (!delegate_.get() || delegate_->IsUserLoggedIn()) 718 if (!delegate_.get() || delegate_->IsUserLoggedIn())
719 CreateLauncher(); 719 CreateLauncher();
720 720
721 // Force a layout. 721 // Force a layout.
722 root_window->layout_manager()->OnWindowResized(); 722 root_window->layout_manager()->OnWindowResized();
723 723
724 // It needs to be created after OnWindowResized has been called, otherwise the 724 // It needs to be created after OnWindowResized has been called, otherwise the
725 // widget will not paint when restoring after a browser crash. 725 // widget will not paint when restoring after a browser crash.
726 desktop_background_controller_->SetDesktopBackgroundImageMode(); 726 desktop_background_controller_->SetLoggedInUserWallpaper();
727 727
728 window_modality_controller_.reset(new internal::WindowModalityController); 728 window_modality_controller_.reset(new internal::WindowModalityController);
729 AddRootWindowEventFilter(window_modality_controller_.get()); 729 AddRootWindowEventFilter(window_modality_controller_.get());
730 730
731 visibility_controller_.reset(new internal::VisibilityController); 731 visibility_controller_.reset(new internal::VisibilityController);
732 732
733 tooltip_controller_.reset(new internal::TooltipController); 733 tooltip_controller_.reset(new internal::TooltipController);
734 AddRootWindowEventFilter(tooltip_controller_.get()); 734 AddRootWindowEventFilter(tooltip_controller_.get());
735 735
736 drag_drop_controller_.reset(new internal::DragDropController); 736 drag_drop_controller_.reset(new internal::DragDropController);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
928 panel_container->SetLayoutManager(panel_layout_manager_); 928 panel_container->SetLayoutManager(panel_layout_manager_);
929 } 929 }
930 } 930 }
931 931
932 void Shell::DisableWorkspaceGridLayout() { 932 void Shell::DisableWorkspaceGridLayout() {
933 if (workspace_controller_.get()) 933 if (workspace_controller_.get())
934 workspace_controller_->workspace_manager()->set_grid_size(0); 934 workspace_controller_->workspace_manager()->set_grid_size(0);
935 } 935 }
936 936
937 } // namespace ash 937 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698