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

Unified Diff: ash/desktop_background/desktop_background_controller.h

Issue 10810039: 2nd display should show the same background as login/lock screen: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Merge with ToT Created 8 years, 5 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/desktop_background/desktop_background_controller.h
diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h
index b575654bdd60a65231d974e51d94eb54d41cd78e..b9278055c3e47ac19a3a9253f82df37d2792605b 100644
--- a/ash/desktop_background/desktop_background_controller.h
+++ b/ash/desktop_background/desktop_background_controller.h
@@ -13,6 +13,7 @@
#include "base/memory/weak_ptr.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkColor.h"
+#include "ui/compositor/layer.h"
#include "ui/gfx/image/image_skia.h"
namespace aura {
@@ -94,25 +95,38 @@ class ASH_EXPORT DesktopBackgroundController {
// is SystemGestureEventFilterTest.ThreeFingerSwipe.
void CreateEmptyWallpaper();
+ // Create desktop views on Lock Screen layer.
+ void CreateLockScreenDesktops();
+
+ // Remove all desktop views on Lock Screen layer created by
+ // CreateLockScreenDesktops.
+ void RemoveLockScreenDesktops();
+
private:
// An operation to asynchronously loads wallpaper.
class WallpaperOperation;
struct WallpaperData;
- // Creates a new background widget using the current wallpapaer image and
- // use it as a background of the |root_window|. Deletes the old widget if any.
- void SetDesktopBackgroundImage(aura::RootWindow* root_window);
-
- // Update the background of all root windows using the current wallpaper image
- // in |current_wallpaper_|.
- void UpdateDesktopBackgroundImageMode();
+ // Creates and adds component for current mode (either Widget or Layer) to
+ // |root_window|.
+ void InstallComponent(aura::RootWindow* root_window);
+ // Creates view for all root windows, or notifies them to repaint if they
+ // already exist.
+ void SetDesktopBackgroundImageMode();
// Creates a new background widget and sets the background mode to image mode.
// Called after wallpaper loaded successfully.
void OnWallpaperLoadCompleted(scoped_refptr<WallpaperOperation> wo);
+ // Add layer with solid |color| to container |container_id| in |root_window|
+ ui::Layer* SetColorLayerForContainer(SkColor color,
+ aura::RootWindow* root_window,
+ int container_id);
+
// Can change at runtime.
+ bool locked_;
+
BackgroundMode desktop_background_mode_;
SkColor background_color_;

Powered by Google App Engine
This is Rietveld 408576698