Chromium Code Reviews| 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 |
| index da162ed4f3b9abe82f0c8f60c9fdd221b61e6526..0b6e49ea12b184c170978e5ccbd1a0deac94699f 100644 |
| --- a/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h |
| +++ b/chrome/browser/ui/webui/options2/chromeos/set_wallpaper_options_handler2.h |
| @@ -5,8 +5,11 @@ |
| #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 "ash/desktop_background/desktop_background_resources.h" |
| #include "base/memory/weak_ptr.h" |
| +#include "chrome/browser/ui/select_file_dialog.h" |
| #include "chrome/browser/ui/webui/options2/options_ui2.h" |
| +#include "content/public/browser/notification_registrar.h" |
| #include "ui/gfx/native_widget_types.h" |
| namespace base { |
| @@ -18,7 +21,8 @@ namespace chromeos { |
| namespace options2 { |
| // ChromeOS user image options page UI handler. |
| -class SetWallpaperOptionsHandler : public ::options2::OptionsPageUIHandler{ |
| +class SetWallpaperOptionsHandler : public ::options2::OptionsPageUIHandler, |
| + public SelectFileDialog::Listener { |
| public: |
| SetWallpaperOptionsHandler(); |
| virtual ~SetWallpaperOptionsHandler(); |
| @@ -34,21 +38,50 @@ class SetWallpaperOptionsHandler : public ::options2::OptionsPageUIHandler{ |
| // Sends list of available default images to the page. |
| void SendDefaultImages(); |
| + // Sends layout options for custome wallpaper. Only exposed CENTER, |
|
flackr
2012/05/04 19:06:17
s/custome/custom
bshe
2012/05/08 22:22:18
Done.
|
| + // CENTER_CROPPED, STRETCH to users. Set the selected option to specified |
| + // |layout|. |
| + void SendLayoutOptions(ash::WallpaperLayout layout); |
| + |
| // Handles page initialized event. |
| void HandlePageInitialized(const base::ListValue* args); |
| // Handles page shown event. |
| void HandlePageShown(const base::ListValue* args); |
| + // Opens a file selection dialog to choose user image from file. |
| + void HandleChooseFile(const base::ListValue* args); |
| + |
| + // SelectFileDialog::Delegate implementation. |
| + virtual void FileSelected( |
| + const FilePath& path, |
| + int index, void* params) OVERRIDE; |
| + |
| + // Redraw the wallpaper with specified wallpaper layout. |
| + void HandleLayoutChanged(const base::ListValue* args); |
| + |
| // Selects one of the available default wallpapers. |
| void HandleDefaultWallpaper(const base::ListValue* args); |
| // Sets user wallpaper to a random one from the default wallpapers. |
| void HandleRandomWallpaper(const base::ListValue* args); |
| + // Call javascript function to add/update custom wallpaper thumbnail in |
| + // picker UI. |
| + void SetCustomWallpaperThumb(); |
|
James Hawkins
2012/05/06 15:49:50
'Thumb' is not an appropriate abbreviation for 'th
bshe
2012/05/08 22:22:18
Done.
|
| + |
| + // content::NotificationObserver implementation. |
| + virtual void Observe(int type, |
| + const content::NotificationSource& source, |
| + const content::NotificationDetails& details) OVERRIDE; |
| + |
| // Returns handle to browser window or NULL if it can't be found. |
| gfx::NativeWindow GetBrowserWindow() const; |
| + scoped_refptr<SelectFileDialog> select_file_dialog_; |
|
flackr
2012/05/04 19:06:17
Comment.
bshe
2012/05/08 22:22:18
Done.
|
| + |
| + content::NotificationRegistrar registrar_; |
| + |
| base::WeakPtrFactory<SetWallpaperOptionsHandler> weak_factory_; |
| DISALLOW_COPY_AND_ASSIGN(SetWallpaperOptionsHandler); |