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

Unified Diff: ash/shell.cc

Issue 2271373002: mash: Port mojo:ash_sysui's ContextMenuMus to mojo:ash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup. Created 4 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 505e943e336ea8cda7d0bb667d8638340b9e2284..1bb1cd227e21ffd27df5fd01ad89246c451b8c2b 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -31,6 +31,7 @@
#include "ash/common/system/locale/locale_notification_controller.h"
#include "ash/common/system/status_area_widget.h"
#include "ash/common/system/tray/system_tray_delegate.h"
+#include "ash/common/wallpaper/wallpaper_delegate.h"
#include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
#include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h"
#include "ash/common/wm/mru_window_tracker.h"
@@ -39,7 +40,6 @@
#include "ash/common/wm_shell.h"
#include "ash/desktop_background/desktop_background_controller.h"
#include "ash/desktop_background/desktop_background_view.h"
-#include "ash/desktop_background/user_wallpaper_delegate.h"
#include "ash/display/cursor_window_controller.h"
#include "ash/display/display_configuration_controller.h"
#include "ash/display/display_manager.h"
@@ -891,8 +891,6 @@ void Shell::Init(const ShellInitParams& init_params) {
// This controller needs to be set before SetupManagedWindowMode.
desktop_background_controller_.reset(
new DesktopBackgroundController(blocking_pool_));
- user_wallpaper_delegate_.reset(
- wm_shell_->delegate()->CreateUserWallpaperDelegate());
session_state_delegate_.reset(
wm_shell_->delegate()->CreateSessionStateDelegate());
@@ -931,12 +929,10 @@ void Shell::Init(const ShellInitParams& init_params) {
audio_a11y_controller_.reset(new chromeos::AudioA11yController);
#endif // defined(OS_CHROMEOS)
- // It needs to be created after RootWindowController has been created
- // (which calls OnWindowResized has been called, otherwise the
- // widget will not paint when restoring after a browser crash. Also it needs
- // to be created after InitSecondaryDisplays() to initialize the wallpapers in
- // the correct size.
- user_wallpaper_delegate_->InitializeWallpaper();
+ // Initialize the wallpaper after the RootWindowController has been created,
+ // otherwise the widget will not paint when restoring after a browser crash.
+ // Also, initialize after display initialization to ensure correct sizing.
+ wm_shell_->wallpaper_delegate()->InitializeWallpaper();
if (cursor_manager_) {
if (initially_hide_cursor_)

Powered by Google App Engine
This is Rietveld 408576698