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

Unified Diff: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h

Issue 9703031: Retry landing "Enable users change desktop background image from settings page in Chromeos Aura bui… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge to trunk 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
Index: chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h
diff --git a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h
new file mode 100644
index 0000000000000000000000000000000000000000..61ed6611660caf7042ebc1041047d0f5687505f1
--- /dev/null
+++ b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h
@@ -0,0 +1,57 @@
+// 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 CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDLER2_H_
+#define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDLER2_H_
+
+#include "base/memory/weak_ptr.h"
+#include "chrome/browser/ui/webui/options2/options_ui2.h"
+#include "ui/gfx/native_widget_types.h"
+
+namespace base {
+class DictionaryValue;
+class ListValue;
+}
+
+namespace chromeos {
+namespace options2 {
+
+// ChromeOS user image options page UI handler.
+class SetWallpaperOptionsHandler : public OptionsPageUIHandler{
+ public:
+ SetWallpaperOptionsHandler();
+ virtual ~SetWallpaperOptionsHandler();
+
+ // OptionsPageUIHandler implementation.
+ virtual void GetLocalizedValues(
+ base::DictionaryValue* localized_strings) OVERRIDE;
+
+ // WebUIMessageHandler implementation.
+ virtual void RegisterMessages() OVERRIDE;
+
+ private:
+ // Sends list of available default images to the page.
+ void SendDefaultImages();
+
+ // Handles page initialized event.
+ void HandlePageInitialized(const base::ListValue* args);
+
+ // Handles page shown event.
+ void HandlePageShown(const base::ListValue* args);
+
+ // Selects one of the available images.
+ void HandleSelectImage(const base::ListValue* args);
+
+ // Returns handle to browser window or NULL if it can't be found.
+ gfx::NativeWindow GetBrowserWindow() const;
+
+ base::WeakPtrFactory<SetWallpaperOptionsHandler> weak_factory_;
+
+ DISALLOW_COPY_AND_ASSIGN(SetWallpaperOptionsHandler);
+};
+
+} // namespace options2
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDLER2_H_

Powered by Google App Engine
This is Rietveld 408576698