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/common/chrome_notification_types.h" | 10 #include "chrome/common/chrome_notification_types.h" |
11 #include "content/public/browser/web_ui_message_handler.h" | 11 #include "content/public/browser/web_ui_message_handler.h" |
12 | 12 |
13 class PrefServiceSimple; | 13 class PrefRegistrySimple; |
14 class PrefServiceSyncable; | 14 class PrefServiceSyncable; |
15 class Profile; | 15 class Profile; |
16 | 16 |
17 // Handler for general New Tab Page functionality that does not belong in a | 17 // Handler for general New Tab Page functionality that does not belong in a |
18 // more specialized handler. | 18 // more specialized handler. |
19 class NewTabPageHandler : public content::WebUIMessageHandler, | 19 class NewTabPageHandler : public content::WebUIMessageHandler, |
20 public base::SupportsWeakPtr<NewTabPageHandler> { | 20 public base::SupportsWeakPtr<NewTabPageHandler> { |
21 public: | 21 public: |
22 NewTabPageHandler(); | 22 NewTabPageHandler(); |
23 | 23 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 static const int kHistogramEnumerationMax = | 86 static const int kHistogramEnumerationMax = |
87 (LAST_PAGE_ID >> kPageIdOffset) + 1; | 87 (LAST_PAGE_ID >> kPageIdOffset) + 1; |
88 | 88 |
89 // Helper to send out promo resource change notification. | 89 // Helper to send out promo resource change notification. |
90 void Notify(chrome::NotificationType notification_type); | 90 void Notify(chrome::NotificationType notification_type); |
91 | 91 |
92 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); | 92 DISALLOW_COPY_AND_ASSIGN(NewTabPageHandler); |
93 }; | 93 }; |
94 | 94 |
95 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ | 95 #endif // CHROME_BROWSER_UI_WEBUI_NTP_NEW_TAB_PAGE_HANDLER_H_ |
OLD | NEW |