OLD | NEW |
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_NEW_TAB_PAGE_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 28 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
29 | 29 |
30 // Registers values (strings etc.) for the page. | 30 // Registers values (strings etc.) for the page. |
31 static void GetLocalizedValues(Profile* profile, | 31 static void GetLocalizedValues(Profile* profile, |
32 base::DictionaryValue* values); | 32 base::DictionaryValue* values); |
33 | 33 |
34 private: | 34 private: |
35 virtual ~NewTabPageHandler(); | 35 virtual ~NewTabPageHandler(); |
36 | 36 |
37 // WebUIMessageHandler implementation. | 37 // WebUIMessageHandler implementation. |
38 virtual void RegisterMessages() OVERRIDE; | 38 virtual void RegisterMessages() override; |
39 | 39 |
40 // Callback for "notificationPromoClosed". No arguments. | 40 // Callback for "notificationPromoClosed". No arguments. |
41 void HandleNotificationPromoClosed(const base::ListValue* args); | 41 void HandleNotificationPromoClosed(const base::ListValue* args); |
42 | 42 |
43 // Callback for "notificationPromoViewed". No arguments. | 43 // Callback for "notificationPromoViewed". No arguments. |
44 void HandleNotificationPromoViewed(const base::ListValue* args); | 44 void HandleNotificationPromoViewed(const base::ListValue* args); |
45 | 45 |
46 // Callback for "notificationPromoLinkClicked". No arguments. | 46 // Callback for "notificationPromoLinkClicked". No arguments. |
47 void HandleNotificationPromoLinkClicked(const base::ListValue* args); | 47 void HandleNotificationPromoLinkClicked(const base::ListValue* args); |
48 | 48 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 static const int kHistogramEnumerationMax = | 80 static const int kHistogramEnumerationMax = |
81 (LAST_PAGE_ID >> kPageIdOffset) + 1; | 81 (LAST_PAGE_ID >> kPageIdOffset) + 1; |
82 | 82 |
83 // Helper to send out promo resource change notification. | 83 // Helper to send out promo resource change notification. |
84 void Notify(chrome::NotificationType notification_type); | 84 void Notify(chrome::NotificationType notification_type); |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); | 86 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); |
87 }; | 87 }; |
88 | 88 |
89 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ | 89 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ |
OLD | NEW |