Index: chrome/browser/ui/webui/options/media_galleries_handler.h |
diff --git a/chrome/browser/ui/webui/options/media_galleries_handler.h b/chrome/browser/ui/webui/options/media_galleries_handler.h |
index 441e7364ffafdd3507c013b7a3d72d0f6dfe0970..4b5ccaf2cf884ece98ff7eaafd221efc644ede2c 100644 |
--- a/chrome/browser/ui/webui/options/media_galleries_handler.h |
+++ b/chrome/browser/ui/webui/options/media_galleries_handler.h |
@@ -6,11 +6,16 @@ |
#define CHROME_BROWSER_UI_WEBUI_OPTIONS_MEDIA_GALLERIES_HANDLER_H_ |
#include "base/memory/ref_counted.h" |
+#include "base/memory/weak_ptr.h" |
#include "base/prefs/pref_change_registrar.h" |
#include "chrome/browser/ui/webui/options/options_ui.h" |
#include "content/public/browser/notification_observer.h" |
#include "ui/shell_dialogs/select_file_dialog.h" |
+namespace chrome { |
+class MediaGalleriesPreferences; |
+} |
+ |
namespace options { |
// Handles messages related to adding or removing media galleries. |
@@ -36,14 +41,32 @@ class MediaGalleriesHandler : public OptionsPageUIHandler, |
// Handles "forgetGallery" message. The first and only argument is the id of |
// the gallery. |
void HandleForgetGallery(const base::ListValue* args); |
+ // Bottom half of |HandleForgetGallery| after async call to get the |
+ // |preferences|. |
+ void HandleForgetGalleryWithPreferences( |
+ uint64 id, |
+ chrome::MediaGalleriesPreferences* preferences); |
// Called when the list of known galleries has changed; updates the page. |
void OnGalleriesChanged(); |
+ // Bottom half of |OnGalleriesChanged| after async call to get the |
+ // |preferences|. |
+ void OnGalleriesChangedWithPreferences( |
+ chrome::MediaGalleriesPreferences* preferences); |
+ |
+ // Bottom half of |FileSelected| after async call to get the |
+ // |preferences|. |
+ void FileSelectedWithPreferences( |
+ base::FilePath path, |
+ chrome::MediaGalleriesPreferences* preferences); |
+ |
PrefChangeRegistrar pref_change_registrar_; |
scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
+ base::WeakPtrFactory<MediaGalleriesHandler> weak_ptr_factory_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MediaGalleriesHandler); |
}; |