OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #ifndef ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ | 5 #ifndef ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ |
6 #define ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ | 6 #define ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "ui/views/corewm/window_animations.h" | 9 #include "ui/views/corewm/window_animations.h" |
10 | 10 |
11 namespace ash { | 11 namespace ash { |
12 | 12 |
13 class ASH_EXPORT UserWallpaperDelegate { | 13 class ASH_EXPORT UserWallpaperDelegate { |
14 public: | 14 public: |
15 virtual ~UserWallpaperDelegate() {} | 15 virtual ~UserWallpaperDelegate() {} |
16 | 16 |
17 // Returns the type of window animation that should be used when showing the | 17 // Returns the type of window animation that should be used when showing the |
18 // wallpaper. | 18 // wallpaper. |
19 virtual int GetAnimationType() = 0; | 19 virtual int GetAnimationType() = 0; |
20 | 20 |
| 21 // Returns the wallpaper animation duration in ms. A value of 0 indicates |
| 22 // that the default should be used. |
| 23 virtual int GetAnimationDurationOverride() = 0; |
| 24 |
| 25 // Sets wallpaper animation duration in ms. Pass 0 to use the default. |
| 26 virtual void SetAnimationDurationOverride(int animation_duration_in_ms) = 0; |
| 27 |
21 // Should the slower initial animation be shown (as opposed to the faster | 28 // Should the slower initial animation be shown (as opposed to the faster |
22 // animation that's used e.g. when switching from one user's wallpaper to | 29 // animation that's used e.g. when switching from one user's wallpaper to |
23 // another's on the login screen)? | 30 // another's on the login screen)? |
24 virtual bool ShouldShowInitialAnimation() = 0; | 31 virtual bool ShouldShowInitialAnimation() = 0; |
25 | 32 |
26 // Updates current wallpaper. It may switch the size of wallpaper based on the | 33 // Updates current wallpaper. It may switch the size of wallpaper based on the |
27 // current display's resolution. | 34 // current display's resolution. |
28 virtual void UpdateWallpaper() = 0; | 35 virtual void UpdateWallpaper() = 0; |
29 | 36 |
30 // Initialize wallpaper. | 37 // Initialize wallpaper. |
31 virtual void InitializeWallpaper() = 0; | 38 virtual void InitializeWallpaper() = 0; |
32 | 39 |
33 // Opens the set wallpaper page in the browser. | 40 // Opens the set wallpaper page in the browser. |
34 virtual void OpenSetWallpaperPage() = 0; | 41 virtual void OpenSetWallpaperPage() = 0; |
35 | 42 |
36 // Returns true if user can open set wallpaper page. Only guest user returns | 43 // Returns true if user can open set wallpaper page. Only guest user returns |
37 // false currently. | 44 // false currently. |
38 virtual bool CanOpenSetWallpaperPage() = 0; | 45 virtual bool CanOpenSetWallpaperPage() = 0; |
39 | 46 |
40 // Notifies delegate that wallpaper animation has finished. | 47 // Notifies delegate that wallpaper animation has finished. |
41 virtual void OnWallpaperAnimationFinished() = 0; | 48 virtual void OnWallpaperAnimationFinished() = 0; |
42 | 49 |
43 // Notifies delegate that wallpaper boot animation has finished. | 50 // Notifies delegate that wallpaper boot animation has finished. |
44 virtual void OnWallpaperBootAnimationFinished() = 0; | 51 virtual void OnWallpaperBootAnimationFinished() = 0; |
45 }; | 52 }; |
46 | 53 |
47 } // namespace ash | 54 } // namespace ash |
48 | 55 |
49 #endif // ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ | 56 #endif // ASH_DESKTOP_BACKGROUND_USER_WALLPAPER_DELEGATE_H_ |
OLD | NEW |