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

Unified Diff: ash/desktop_background/desktop_background_controller.h

Issue 9580023: Enable user change background image in settings page in Aura build. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Address review Created 8 years, 9 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/ash.gyp ('k') | ash/desktop_background/desktop_background_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
new file mode 100644
index 0000000000000000000000000000000000000000..e5bf9ae64484ac0017d4dd07a8fa079bcd96a170
--- /dev/null
+++ b/ash/desktop_background/desktop_background_controller.h
@@ -0,0 +1,40 @@
+// Copyright (c) 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_DESKTOP_BACKGROUND_CONTROLLER_H_
+#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
+#pragma once
+
+#include "ash/ash_export.h"
+#include "base/basictypes.h"
+#include "content/public/browser/notification_observer.h"
+#include "content/public/browser/notification_registrar.h"
+#include "ui/aura/root_window_observer.h"
flackr 2012/03/06 20:25:28 Remove this include as well.
bshe 2012/03/07 19:50:44 Done.
+#include "third_party/skia/include/core/SkBitmap.h"
+
+namespace ash {
+
+// A class to listen for login and desktop background change events and set the
+// corresponding default wallpaper in Aura shell.
+class ASH_EXPORT DesktopBackgroundController :
+ public content::NotificationObserver {
+ public:
+ DesktopBackgroundController();
+ virtual ~DesktopBackgroundController();
+
+ // Change the desktop background image to default wallpaper with |index|.
+ void OnDesktopBackgroundChange(int index);
+ private:
+ virtual void Observe(int type,
+ const content::NotificationSource& source,
+ const content::NotificationDetails& details) OVERRIDE;
+
+ content::NotificationRegistrar registrar_;
+
+ DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundController);
+};
+
+} // namespace ash
+
+#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_CONTROLLER_H_
« no previous file with comments | « ash/ash.gyp ('k') | ash/desktop_background/desktop_background_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698