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

Side by Side Diff: chrome/browser/ui/webui/ntp/android/promo_handler.h

Issue 11570009: Split PrefService into PrefService, PrefServiceSimple and PrefServiceSyncable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head again, previous had unrelated broken win_rel test. Created 8 years 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_NTP_ANDROID_PROMO_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_ANDROID_PROMO_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_NTP_ANDROID_PROMO_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_NTP_ANDROID_PROMO_HANDLER_H_
7 7
8 #include "content/public/browser/notification_observer.h" 8 #include "content/public/browser/notification_observer.h"
9 #include "content/public/browser/notification_registrar.h" 9 #include "content/public/browser/notification_registrar.h"
10 #include "content/public/browser/web_ui_message_handler.h" 10 #include "content/public/browser/web_ui_message_handler.h"
11 11
12 class PrefService; 12 class PrefServiceSyncable;
13 13
14 namespace base { 14 namespace base {
15 class DictionaryValue; 15 class DictionaryValue;
16 class ListValue; 16 class ListValue;
17 } 17 }
18 18
19 // The handler for JavaScript messages related to the Android NTP promo. 19 // The handler for JavaScript messages related to the Android NTP promo.
20 class PromoHandler : public content::WebUIMessageHandler, 20 class PromoHandler : public content::WebUIMessageHandler,
21 public content::NotificationObserver { 21 public content::NotificationObserver {
22 public: 22 public:
23 PromoHandler(); 23 PromoHandler();
24 virtual ~PromoHandler(); 24 virtual ~PromoHandler();
25 25
26 // WebUIMessageHandler implementation. 26 // WebUIMessageHandler implementation.
27 virtual void RegisterMessages() OVERRIDE; 27 virtual void RegisterMessages() OVERRIDE;
28 28
29 // Register preferences. 29 // Register preferences.
30 static void RegisterUserPrefs(PrefService* prefs); 30 static void RegisterUserPrefs(PrefServiceSyncable* prefs);
31 31
32 private: 32 private:
33 // NotificationObserver override and implementation. 33 // NotificationObserver override and implementation.
34 virtual void Observe(int type, 34 virtual void Observe(int type,
35 const content::NotificationSource& source, 35 const content::NotificationSource& source,
36 const content::NotificationDetails& details) OVERRIDE; 36 const content::NotificationDetails& details) OVERRIDE;
37 37
38 // Callback for the "promoSendEmail" message. 38 // Callback for the "promoSendEmail" message.
39 // |args| is a list [ subject, body, app-chooser-message ]. 39 // |args| is a list [ subject, body, app-chooser-message ].
40 void HandlePromoSendEmail(const base::ListValue* args); 40 void HandlePromoSendEmail(const base::ListValue* args);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // Updates the profile preference if any desktop session was discovered. 73 // Updates the profile preference if any desktop session was discovered.
74 void CheckDesktopSessions(); 74 void CheckDesktopSessions();
75 75
76 // Registrar to receive notification on promo changes. 76 // Registrar to receive notification on promo changes.
77 content::NotificationRegistrar registrar_; 77 content::NotificationRegistrar registrar_;
78 78
79 DISALLOW_COPY_AND_ASSIGN(PromoHandler); 79 DISALLOW_COPY_AND_ASSIGN(PromoHandler);
80 }; 80 };
81 81
82 #endif // CHROME_BROWSER_UI_WEBUI_NTP_ANDROID_PROMO_HANDLER_H_ 82 #endif // CHROME_BROWSER_UI_WEBUI_NTP_ANDROID_PROMO_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/instant_ui.cc ('k') | chrome/browser/ui/webui/ntp/android/promo_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698