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

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

Issue 10808092: Add settings UI for managing defaults (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 4 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
OLDNEW
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698