OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDLER2
_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDLER2
_H_ |
| 7 |
| 8 #include "base/memory/weak_ptr.h" |
| 9 #include "chrome/browser/ui/webui/options2/options_ui2.h" |
| 10 #include "ui/gfx/native_widget_types.h" |
| 11 |
| 12 namespace base { |
| 13 class DictionaryValue; |
| 14 class ListValue; |
| 15 } |
| 16 |
| 17 namespace chromeos { |
| 18 namespace options2 { |
| 19 |
| 20 // ChromeOS user image options page UI handler. |
| 21 class SetWallpaperOptionsHandler : public OptionsPageUIHandler{ |
| 22 public: |
| 23 SetWallpaperOptionsHandler(); |
| 24 virtual ~SetWallpaperOptionsHandler(); |
| 25 |
| 26 // OptionsPageUIHandler implementation. |
| 27 virtual void GetLocalizedValues( |
| 28 base::DictionaryValue* localized_strings) OVERRIDE; |
| 29 |
| 30 // WebUIMessageHandler implementation. |
| 31 virtual void RegisterMessages() OVERRIDE; |
| 32 |
| 33 private: |
| 34 // Sends list of available default images to the page. |
| 35 void SendDefaultImages(); |
| 36 |
| 37 // Handles page initialized event. |
| 38 void HandlePageInitialized(const base::ListValue* args); |
| 39 |
| 40 // Handles page shown event. |
| 41 void HandlePageShown(const base::ListValue* args); |
| 42 |
| 43 // Selects one of the available images. |
| 44 void HandleSelectImage(const base::ListValue* args); |
| 45 |
| 46 // Returns handle to browser window or NULL if it can't be found. |
| 47 gfx::NativeWindow GetBrowserWindow() const; |
| 48 |
| 49 base::WeakPtrFactory<SetWallpaperOptionsHandler> weak_factory_; |
| 50 |
| 51 DISALLOW_COPY_AND_ASSIGN(SetWallpaperOptionsHandler); |
| 52 }; |
| 53 |
| 54 } // namespace options2 |
| 55 } // namespace chromeos |
| 56 |
| 57 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_CHROMEOS_SET_WALLPAPER_OPTIONS_HANDL
ER2_H_ |
OLD | NEW |