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_MEDIA_GALLERY_HANDLER_H_ | |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERY_HANDLER_H_ | |
csilv
2012/08/09 18:18:04
CHROME_BROWSER_UI_WEBUI_OPTIONS2_WEB_INTENTS_DEFAU
| |
7 | |
8 #include "chrome/browser/intents/default_web_intent_service.h" | |
9 #include "chrome/browser/intents/web_intents_registry.h" | |
10 #include "chrome/browser/ui/webui/options2/options_ui.h" | |
11 #include "content/public/browser/notification_observer.h" | |
12 | |
13 namespace options2 { | |
14 | |
15 // Handles messages related to adding or removing media galleries. | |
16 class WebIntentsDefaultsHandler : public OptionsPageUIHandler { | |
17 public: | |
18 WebIntentsDefaultsHandler(); | |
19 virtual ~WebIntentsDefaultsHandler(); | |
20 | |
21 // OptionsPageUIHandler implementation. | |
22 virtual void GetLocalizedValues(base::DictionaryValue* values) OVERRIDE; | |
23 virtual void InitializeHandler() OVERRIDE; | |
24 virtual void InitializePage() OVERRIDE; | |
25 virtual void RegisterMessages() OVERRIDE; | |
26 | |
27 // NotificationObserver implementation. | |
28 virtual void Observe(int type, | |
29 const content::NotificationSource& source, | |
30 const content::NotificationDetails& details) OVERRIDE; | |
31 | |
32 private: | |
33 // Handles the "removeDefault" message. The first and only argument | |
34 // of concern is the service_url of the defaults to be removed. | |
35 void HandleRemoveServiceDefaults(const base::ListValue* args); | |
36 | |
37 // Called when the list of known defaults has changed; updates the page. | |
38 void UpdateServiceList(); | |
39 | |
40 void OnServicesLoaded(const std::vector<DefaultWebIntentService>& services); | |
41 | |
42 WebIntentsRegistry* GetRegistry(); | |
43 DISALLOW_COPY_AND_ASSIGN(WebIntentsDefaultsHandler); | |
44 }; | |
45 | |
46 } // namespace options2 | |
47 | |
48 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS2_MEDIA_GALLERY_HANDLER_H_ | |
OLD | NEW |