| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
| 10 #include "content/browser/webui/web_ui.h" | 10 #include "content/public/browser/web_ui_message_handler.h" |
| 11 | 11 |
| 12 class PrefService; | 12 class PrefService; |
| 13 class Profile; | 13 class Profile; |
| 14 | 14 |
| 15 // Handler for general New Tab Page functionality that does not belong in a | 15 // Handler for general New Tab Page functionality that does not belong in a |
| 16 // more specialized handler. | 16 // more specialized handler. |
| 17 class NewTabPageHandler : public WebUIMessageHandler { | 17 class NewTabPageHandler : public content::WebUIMessageHandler { |
| 18 public: | 18 public: |
| 19 NewTabPageHandler(); | 19 NewTabPageHandler(); |
| 20 virtual ~NewTabPageHandler(); | 20 virtual ~NewTabPageHandler(); |
| 21 | 21 |
| 22 // WebUIMessageHandler implementation. | 22 // WebUIMessageHandler implementation. |
| 23 virtual void RegisterMessages() OVERRIDE; | 23 virtual void RegisterMessages() OVERRIDE; |
| 24 | 24 |
| 25 // Callback for "closeNotificationPromo". | 25 // Callback for "closeNotificationPromo". |
| 26 void HandleCloseNotificationPromo(const ListValue* args); | 26 void HandleCloseNotificationPromo(const ListValue* args); |
| 27 | 27 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 static const int kHistogramEnumerationMax = | 70 static const int kHistogramEnumerationMax = |
| 71 (LAST_PAGE_ID >> kPageIdOffset) + 1; | 71 (LAST_PAGE_ID >> kPageIdOffset) + 1; |
| 72 | 72 |
| 73 // Helper to send out promo resource change notification. | 73 // Helper to send out promo resource change notification. |
| 74 void Notify(chrome::NotificationType notification_type); | 74 void Notify(chrome::NotificationType notification_type); |
| 75 | 75 |
| 76 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); | 76 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ | 79 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ |
| OLD | NEW |