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

Side by Side Diff: chrome/browser/ui/webui/options2/media_galleries_handler.h

Issue 10835016: Rename media gallery -> media galleries in pref/UI components. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERY_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERIES_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERY_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERIES_HANDLER_H_
7 7
8 #include "chrome/browser/prefs/pref_change_registrar.h" 8 #include "chrome/browser/prefs/pref_change_registrar.h"
9 #include "chrome/browser/ui/select_file_dialog.h" 9 #include "chrome/browser/ui/select_file_dialog.h"
10 #include "chrome/browser/ui/webui/options2/options_ui.h" 10 #include "chrome/browser/ui/webui/options2/options_ui.h"
11 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
12 12
13 namespace options2 { 13 namespace options2 {
14 14
15 // Handles messages related to adding or removing media galleries. 15 // Handles messages related to adding or removing media galleries.
16 class MediaGalleryHandler : public OptionsPageUIHandler, 16 class MediaGalleriesHandler : public OptionsPageUIHandler,
17 public SelectFileDialog::Listener { 17 public SelectFileDialog::Listener {
18 public: 18 public:
19 MediaGalleryHandler(); 19 MediaGalleriesHandler();
20 virtual ~MediaGalleryHandler(); 20 virtual ~MediaGalleriesHandler();
21 21
22 // OptionsPageUIHandler implementation. 22 // OptionsPageUIHandler implementation.
23 virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE; 23 virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE;
24 virtual void InitializeHandler() OVERRIDE; 24 virtual void InitializeHandler() OVERRIDE;
25 virtual void InitializePage() OVERRIDE; 25 virtual void InitializePage() OVERRIDE;
26 virtual void RegisterMessages() OVERRIDE; 26 virtual void RegisterMessages() OVERRIDE;
27 27
28 // SelectFileDialog::Listener implementation. 28 // SelectFileDialog::Listener implementation.
29 virtual void FileSelected(const FilePath& path, int index, void* params) 29 virtual void FileSelected(const FilePath& path, int index, void* params)
30 OVERRIDE; 30 OVERRIDE;
31 31
32 // NotificationObserver implementation. 32 // NotificationObserver implementation.
33 virtual void Observe(int type, 33 virtual void Observe(int type,
34 const content::NotificationSource& source, 34 const content::NotificationSource& source,
35 const content::NotificationDetails& details) OVERRIDE; 35 const content::NotificationDetails& details) OVERRIDE;
36 36
37 private: 37 private:
38 // Handles the "addNewGallery" message (no arguments). 38 // Handles the "addNewGallery" message (no arguments).
39 void HandleAddNewGallery(const base::ListValue* args); 39 void HandleAddNewGallery(const base::ListValue* args);
40 // Handles "forgetGallery" message. The first and only argument is the id of 40 // Handles "forgetGallery" message. The first and only argument is the id of
41 // the gallery. 41 // the gallery.
42 void HandleForgetGallery(const base::ListValue* args); 42 void HandleForgetGallery(const base::ListValue* args);
43 43
44 // Called when the list of known galleries has changed; updates the page. 44 // Called when the list of known galleries has changed; updates the page.
45 void OnGalleriesChanged(); 45 void OnGalleriesChanged();
46 46
47 PrefChangeRegistrar pref_change_registrar_; 47 PrefChangeRegistrar pref_change_registrar_;
48 48
49 DISALLOW_COPY_AND_ASSIGN(MediaGalleryHandler); 49 DISALLOW_COPY_AND_ASSIGN(MediaGalleriesHandler);
50 }; 50 };
51 51
52 } // namespace options2 52 } // namespace options2
53 53
54 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERY_HANDLER_H_ 54 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERIES_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/options2/options_bundle.js ('k') | chrome/browser/ui/webui/options2/media_galleries_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698