diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 18:55:41 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-13 18:55:41 +0000 |
commit | 81abb10372059ab34d230914c67b51adf612b444 (patch) | |
tree | ad92fc09e4c1c8bce36fb2c01b950274ffe3ceee /ash | |
parent | 4ed2df3e216569f2e4187b036aaf8d15f6bd299d (diff) | |
download | chromium_src-81abb10372059ab34d230914c67b51adf612b444.zip chromium_src-81abb10372059ab34d230914c67b51adf612b444.tar.gz chromium_src-81abb10372059ab34d230914c67b51adf612b444.tar.bz2 |
ash: Move UserWallpaperDelegate to its own header file.
BUG=159047
R=derat@chromium.org
TBR=dpolukhin@chromium.org
Review URL: https://codereview.chromium.org/11363185
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167435 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash')
-rw-r--r-- | ash/accelerators/accelerator_controller.cc | 1 | ||||
-rw-r--r-- | ash/ash.gyp | 1 | ||||
-rw-r--r-- | ash/desktop_background/desktop_background_controller.cc | 1 | ||||
-rw-r--r-- | ash/desktop_background/desktop_background_controller.h | 35 | ||||
-rw-r--r-- | ash/desktop_background/desktop_background_view.cc | 1 | ||||
-rw-r--r-- | ash/desktop_background/user_wallpaper_delegate.h | 49 | ||||
-rw-r--r-- | ash/shell.cc | 1 |
7 files changed, 54 insertions, 35 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc index 5520e98..00951a3 100644 --- a/ash/accelerators/accelerator_controller.cc +++ b/ash/accelerators/accelerator_controller.cc @@ -12,6 +12,7 @@ #include "ash/ash_switches.h" #include "ash/caps_lock_delegate.h" #include "ash/desktop_background/desktop_background_controller.h" +#include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/display/display_controller.h" #include "ash/display/multi_display_manager.h" #include "ash/focus_cycler.h" diff --git a/ash/ash.gyp b/ash/ash.gyp index a766593..649062c4 100644 --- a/ash/ash.gyp +++ b/ash/ash.gyp @@ -74,6 +74,7 @@ 'desktop_background/desktop_background_view.h', 'desktop_background/desktop_background_widget_controller.cc', 'desktop_background/desktop_background_widget_controller.h', + 'desktop_background/user_wallpaper_delegate.h', 'display/display_controller.cc', 'display/display_controller.h', 'display/display_error_dialog.cc', diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc index 3ca189c..8575c1e 100644 --- a/ash/desktop_background/desktop_background_controller.cc +++ b/ash/desktop_background/desktop_background_controller.cc @@ -7,6 +7,7 @@ #include "ash/desktop_background/desktop_background_controller_observer.h" #include "ash/desktop_background/desktop_background_view.h" #include "ash/desktop_background/desktop_background_widget_controller.h" +#include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/root_window_controller.h" #include "ash/shell.h" #include "ash/shell_factory.h" diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h index 39cbbc5..23302c8 100644 --- a/ash/desktop_background/desktop_background_controller.h +++ b/ash/desktop_background/desktop_background_controller.h @@ -7,7 +7,6 @@ #include "ash/ash_export.h" #include "ash/desktop_background/desktop_background_resources.h" -#include "ash/wm/window_animations.h" #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" @@ -36,40 +35,6 @@ ASH_EXPORT extern const int kLargeWallpaperMaxHeight; class DesktopBackgroundControllerObserver; -class UserWallpaperDelegate { - public: - virtual ~UserWallpaperDelegate() {} - - // Returns the type of window animation that should be used when showing the - // wallpaper. - virtual ash::WindowVisibilityAnimationType GetAnimationType() = 0; - - // Should the slower initial animation be shown (as opposed to the faster - // animation that's used e.g. when switching from one user's wallpaper to - // another's on the login screen)? - virtual bool ShouldShowInitialAnimation() = 0; - - // Updates current wallpaper. It may switch the size of wallpaper based on the - // current display's resolution. - virtual void UpdateWallpaper() = 0; - - // Initialize wallpaper. - virtual void InitializeWallpaper() = 0; - - // Opens the set wallpaper page in the browser. - virtual void OpenSetWallpaperPage() = 0; - - // Returns true if user can open set wallpaper page. Only guest user returns - // false currently. - virtual bool CanOpenSetWallpaperPage() = 0; - - // Notifies delegate that wallpaper animation has finished. - virtual void OnWallpaperAnimationFinished() = 0; - - // Notifies delegate that wallpaper boot animation has finished. - virtual void OnWallpaperBootAnimationFinished() = 0; -}; - // Loads selected desktop wallpaper from file system asynchronously and updates // background layer if loaded successfully. class ASH_EXPORT DesktopBackgroundController : public aura::WindowObserver { diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc index de371d5..99b22dd 100644 --- a/ash/desktop_background/desktop_background_view.cc +++ b/ash/desktop_background/desktop_background_view.cc @@ -9,6 +9,7 @@ #include "ash/ash_export.h" #include "ash/desktop_background/desktop_background_controller.h" #include "ash/desktop_background/desktop_background_widget_controller.h" +#include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/root_window_controller.h" #include "ash/shell.h" #include "ash/shell_window_ids.h" diff --git a/ash/desktop_background/user_wallpaper_delegate.h b/ash/desktop_background/user_wallpaper_delegate.h new file mode 100644 index 0000000..15c6d62 --- /dev/null +++ b/ash/desktop_background/user_wallpaper_delegate.h @@ -0,0 +1,49 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ +#define ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ + +#include "ash/ash_export.h" +#include "ash/wm/window_animations.h" + +namespace ash { + +class ASH_EXPORT UserWallpaperDelegate { + public: + virtual ~UserWallpaperDelegate() {} + + // Returns the type of window animation that should be used when showing the + // wallpaper. + virtual WindowVisibilityAnimationType GetAnimationType() = 0; + + // Should the slower initial animation be shown (as opposed to the faster + // animation that's used e.g. when switching from one user's wallpaper to + // another's on the login screen)? + virtual bool ShouldShowInitialAnimation() = 0; + + // Updates current wallpaper. It may switch the size of wallpaper based on the + // current display's resolution. + virtual void UpdateWallpaper() = 0; + + // Initialize wallpaper. + virtual void InitializeWallpaper() = 0; + + // Opens the set wallpaper page in the browser. + virtual void OpenSetWallpaperPage() = 0; + + // Returns true if user can open set wallpaper page. Only guest user returns + // false currently. + virtual bool CanOpenSetWallpaperPage() = 0; + + // Notifies delegate that wallpaper animation has finished. + virtual void OnWallpaperAnimationFinished() = 0; + + // Notifies delegate that wallpaper boot animation has finished. + virtual void OnWallpaperBootAnimationFinished() = 0; +}; + +} // namespace ash + +#endif // ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ diff --git a/ash/shell.cc b/ash/shell.cc index 36e61da..bac0bb6 100644 --- a/ash/shell.cc +++ b/ash/shell.cc @@ -13,6 +13,7 @@ #include "ash/desktop_background/desktop_background_controller.h" #include "ash/desktop_background/desktop_background_resources.h" #include "ash/desktop_background/desktop_background_view.h" +#include "ash/desktop_background/user_wallpaper_delegate.h" #include "ash/display/display_controller.h" #include "ash/display/mouse_cursor_event_filter.h" #include "ash/display/multi_display_manager.h" |