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_APP_LAUNCHER_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 void HandleGenerateAppForLink(const base::ListValue* args); | 99 void HandleGenerateAppForLink(const base::ListValue* args); |
100 | 100 |
101 // Callback for the "recordAppLaunchByURL" message. Takes an escaped URL and a | 101 // Callback for the "recordAppLaunchByURL" message. Takes an escaped URL and a |
102 // launch source (integer), and if the URL represents an app, records the | 102 // launch source (integer), and if the URL represents an app, records the |
103 // action for UMA. | 103 // action for UMA. |
104 void HandleRecordAppLaunchByURL(const base::ListValue* args); | 104 void HandleRecordAppLaunchByURL(const base::ListValue* args); |
105 | 105 |
106 // Callback for "closeNotification" message. | 106 // Callback for "closeNotification" message. |
107 void HandleNotificationClose(const base::ListValue* args); | 107 void HandleNotificationClose(const base::ListValue* args); |
108 | 108 |
| 109 // Callback for "setNotificationsDisabled" message. |
| 110 void HandleSetNotificationsDisabled(const base::ListValue* args); |
| 111 |
109 // Register app launcher preferences. | 112 // Register app launcher preferences. |
110 static void RegisterUserPrefs(PrefService* pref_service); | 113 static void RegisterUserPrefs(PrefService* pref_service); |
111 | 114 |
112 private: | 115 private: |
113 struct AppInstallInfo { | 116 struct AppInstallInfo { |
114 bool is_bookmark_app; | 117 bool is_bookmark_app; |
115 string16 title; | 118 string16 title; |
116 GURL app_url; | 119 GURL app_url; |
117 int page_index; | 120 int page_index; |
118 }; | 121 }; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
196 // when the app is added to the page (via getAppsCallback or appAdded). | 199 // when the app is added to the page (via getAppsCallback or appAdded). |
197 std::string highlight_app_id_; | 200 std::string highlight_app_id_; |
198 | 201 |
199 // Hold state for favicon requests. | 202 // Hold state for favicon requests. |
200 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; | 203 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; |
201 | 204 |
202 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 205 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
203 }; | 206 }; |
204 | 207 |
205 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 208 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
OLD | NEW |