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

Side by Side Diff: ash/shell.cc

Issue 10918201: Reorder the initialization of wallpapers and secondary display. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 resize_shadow_controller_.reset(new internal::ResizeShadowController()); 477 resize_shadow_controller_.reset(new internal::ResizeShadowController());
478 shadow_controller_.reset(new internal::ShadowController()); 478 shadow_controller_.reset(new internal::ShadowController());
479 } 479 }
480 480
481 if (!delegate_.get() || delegate_->IsUserLoggedIn()) 481 if (!delegate_.get() || delegate_->IsUserLoggedIn())
482 CreateLauncher(); 482 CreateLauncher();
483 483
484 // Force Layout 484 // Force Layout
485 root_window_controller->root_window_layout()->OnWindowResized(); 485 root_window_controller->root_window_layout()->OnWindowResized();
486 486
487 display_controller_->InitSecondaryDisplays();
488
487 // It needs to be created after OnWindowResized has been called, otherwise the 489 // It needs to be created after OnWindowResized has been called, otherwise the
488 // widget will not paint when restoring after a browser crash. 490 // widget will not paint when restoring after a browser crash. Also it needs
491 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
492 // the correct size.
489 user_wallpaper_delegate_->InitializeWallpaper(); 493 user_wallpaper_delegate_->InitializeWallpaper();
490 494
491 power_button_controller_.reset(new PowerButtonController); 495 power_button_controller_.reset(new PowerButtonController);
492 AddShellObserver(power_button_controller_.get()); 496 AddShellObserver(power_button_controller_.get());
493 497
494 display_controller_->InitSecondaryDisplays();
495
496 if (initially_hide_cursor_) 498 if (initially_hide_cursor_)
497 cursor_manager_.ShowCursor(false); 499 cursor_manager_.ShowCursor(false);
498 } 500 }
499 501
500 void Shell::AddEnvEventFilter(aura::EventFilter* filter) { 502 void Shell::AddEnvEventFilter(aura::EventFilter* filter) {
501 env_filter_->AddFilter(filter); 503 env_filter_->AddFilter(filter);
502 } 504 }
503 505
504 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) { 506 void Shell::RemoveEnvEventFilter(aura::EventFilter* filter) {
505 env_filter_->RemoveFilter(filter); 507 env_filter_->RemoveFilter(filter);
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
759 } 761 }
760 762
761 void Shell::ShowCursor(bool visible) { 763 void Shell::ShowCursor(bool visible) {
762 RootWindowList root_windows = GetAllRootWindows(); 764 RootWindowList root_windows = GetAllRootWindows();
763 for (RootWindowList::iterator iter = root_windows.begin(); 765 for (RootWindowList::iterator iter = root_windows.begin();
764 iter != root_windows.end(); ++iter) 766 iter != root_windows.end(); ++iter)
765 (*iter)->ShowCursor(visible); 767 (*iter)->ShowCursor(visible);
766 } 768 }
767 769
768 } // namespace ash 770 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698