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

Side by Side Diff: ash/desktop_background/desktop_background_controller.h

Issue 10492003: Use a #fefefe solid color wallpaper background before user login for GAIA login flow (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: nits Created 8 years, 6 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
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 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ 5 #ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ 6 #define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "ash/ash_export.h" 9 #include "ash/ash_export.h"
10 #include "ash/desktop_background/desktop_background_resources.h" 10 #include "ash/desktop_background/desktop_background_resources.h"
11 #include "base/basictypes.h" 11 #include "base/basictypes.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "third_party/skia/include/core/SkColor.h"
13 14
14 namespace aura { 15 namespace aura {
15 class RootWindow; 16 class RootWindow;
16 } 17 }
17 18
18 namespace gfx { 19 namespace gfx {
19 class ImageSkia; 20 class ImageSkia;
20 } 21 }
21 22
22 namespace ash { 23 namespace ash {
23 24
24 class UserWallpaperDelegate { 25 class UserWallpaperDelegate {
25 public: 26 public:
26 virtual ~UserWallpaperDelegate() {} 27 virtual ~UserWallpaperDelegate() {}
27 28
28 // Loads logged in user wallpaper asynchronously and sets to current wallpaper 29 // Initialize wallpaper.
29 // after loaded. 30 virtual void InitializeWallpaper() = 0;
30 virtual void SetLoggedInUserWallpaper() = 0;
31 31
32 // Opens the set wallpaper page in the browser. 32 // Opens the set wallpaper page in the browser.
33 virtual void OpenSetWallpaperPage() = 0; 33 virtual void OpenSetWallpaperPage() = 0;
34 34
35 // Returns true if user can open set wallpaper page. Only guest user returns 35 // Returns true if user can open set wallpaper page. Only guest user returns
36 // false currently. 36 // false currently.
37 virtual bool CanOpenSetWallpaperPage() = 0; 37 virtual bool CanOpenSetWallpaperPage() = 0;
38 }; 38 };
39 39
40 // Loads selected desktop wallpaper from file system asynchronously and updates 40 // Loads selected desktop wallpaper from file system asynchronously and updates
(...skipping 18 matching lines...) Expand all
59 void SetDefaultWallpaper(int index); 59 void SetDefaultWallpaper(int index);
60 60
61 // Sets the user selected custom wallpaper. Called when user selected a file 61 // Sets the user selected custom wallpaper. Called when user selected a file
62 // from file system or changed the layout of wallpaper. 62 // from file system or changed the layout of wallpaper.
63 void SetCustomWallpaper(const gfx::ImageSkia& wallpaper, 63 void SetCustomWallpaper(const gfx::ImageSkia& wallpaper,
64 WallpaperLayout layout); 64 WallpaperLayout layout);
65 65
66 // Cancels the current wallpaper loading operation. 66 // Cancels the current wallpaper loading operation.
67 void CancelPendingWallpaperOperation(); 67 void CancelPendingWallpaperOperation();
68 68
69 // Sets the desktop background to solid color mode and creates a solid color 69 // Sets the desktop background to solid color mode and creates a solid
70 // layout. 70 // |color| layout.
71 void SetDesktopBackgroundSolidColorMode(); 71 void SetDesktopBackgroundSolidColorMode(SkColor color);
72 72
73 // Creates an empty wallpaper. Some tests require a wallpaper widget is ready 73 // Creates an empty wallpaper. Some tests require a wallpaper widget is ready
74 // when running. However, the wallpaper widgets are now created asynchronously 74 // when running. However, the wallpaper widgets are now created asynchronously
75 // . If loading a real wallpaper, there are cases that these tests crash 75 // . If loading a real wallpaper, there are cases that these tests crash
76 // because the required widget is not ready. This function synchronously 76 // because the required widget is not ready. This function synchronously
77 // creates an empty widget for those tests to prevent crashes. An example test 77 // creates an empty widget for those tests to prevent crashes. An example test
78 // is SystemGestureEventFilterTest.ThreeFingerSwipe. 78 // is SystemGestureEventFilterTest.ThreeFingerSwipe.
79 void CreateEmptyWallpaper(); 79 void CreateEmptyWallpaper();
80 80
81 private: 81 private:
(...skipping 20 matching lines...) Expand all
102 scoped_refptr<WallpaperOperation> wallpaper_op_; 102 scoped_refptr<WallpaperOperation> wallpaper_op_;
103 103
104 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_; 104 base::WeakPtrFactory<DesktopBackgroundController> weak_ptr_factory_;
105 105
106 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController); 106 DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController);
107 }; 107 };
108 108
109 } // namespace ash 109 } // namespace ash
110 110
111 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_ 111 #endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller.cc ('k') | ash/desktop_background/desktop_background_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698