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

Unified Diff: ash/shell.cc

Issue 24499002: Reload wallpaper when display configuration changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/desktop_background/desktop_background_controller_unittest.cc ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index 3606c5d78155195cbeab2317cb4a14424ffb210e..8ee32d7268ea280a44f08e0bde08d5da8eaa42f8 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -128,47 +128,6 @@ namespace {
using aura::Window;
using views::Widget;
-// This dummy class is used for shell unit tests. We dont have chrome delegate
-// in these tests.
-class DummyUserWallpaperDelegate : public UserWallpaperDelegate {
- public:
- DummyUserWallpaperDelegate() {}
-
- virtual ~DummyUserWallpaperDelegate() {}
-
- virtual int GetAnimationType() OVERRIDE {
- return views::corewm::WINDOW_VISIBILITY_ANIMATION_TYPE_FADE;
- }
-
- virtual bool ShouldShowInitialAnimation() OVERRIDE {
- return false;
- }
-
- virtual void UpdateWallpaper() OVERRIDE {
- }
-
- virtual void InitializeWallpaper() OVERRIDE {
- ash::Shell::GetInstance()->desktop_background_controller()->
- CreateEmptyWallpaper();
- }
-
- virtual void OpenSetWallpaperPage() OVERRIDE {
- }
-
- virtual bool CanOpenSetWallpaperPage() OVERRIDE {
- return false;
- }
-
- virtual void OnWallpaperAnimationFinished() OVERRIDE {
- }
-
- virtual void OnWallpaperBootAnimationFinished() OVERRIDE {
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(DummyUserWallpaperDelegate);
-};
-
// A Corewm VisibilityController subclass that calls the Ash animation routine
// so we can pick up our extended animations. See ash/wm/window_animations.h.
class AshVisibilityController : public views::corewm::VisibilityController {
@@ -309,6 +268,7 @@ Shell::~Shell() {
mru_window_tracker_.reset();
resolution_notification_controller_.reset();
+ desktop_background_controller_.reset();
// This also deletes all RootWindows. Note that we invoke Shutdown() on
// DisplayController before resetting |display_controller_|, since destruction
@@ -569,8 +529,6 @@ void Shell::Init() {
// This controller needs to be set before SetupManagedWindowMode.
desktop_background_controller_.reset(new DesktopBackgroundController());
user_wallpaper_delegate_.reset(delegate_->CreateUserWallpaperDelegate());
- if (!user_wallpaper_delegate_)
- user_wallpaper_delegate_.reset(new DummyUserWallpaperDelegate());
// StatusAreaWidget uses Shell's CapsLockDelegate.
caps_lock_delegate_.reset(delegate_->CreateCapsLockDelegate());
« no previous file with comments | « ash/desktop_background/desktop_background_controller_unittest.cc ('k') | ash/shell/shell_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698