Chromium Code Reviews| 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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/extension_app_api.h" | 10 #include "chrome/browser/extensions/extension_app_api.h" |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 95 | 95 |
| 96 // Callback for the "promoSeen" message. | 96 // Callback for the "promoSeen" message. |
| 97 void HandlePromoSeen(const base::ListValue* args); | 97 void HandlePromoSeen(const base::ListValue* args); |
| 98 | 98 |
| 99 // Callback for the "saveAppPageName" message. | 99 // Callback for the "saveAppPageName" message. |
| 100 void HandleSaveAppPageName(const base::ListValue* args); | 100 void HandleSaveAppPageName(const base::ListValue* args); |
| 101 | 101 |
| 102 // Callback for the "generateAppForLink" message. | 102 // Callback for the "generateAppForLink" message. |
| 103 void HandleGenerateAppForLink(const base::ListValue* args); | 103 void HandleGenerateAppForLink(const base::ListValue* args); |
| 104 | 104 |
| 105 // Callback for the "recordAppLaunchByURL" message. Takes a URL and a launch | |
|
Rick Byers
2011/08/04 00:32:21
nit: s/URL/escaped URL
I never would have guessed
| |
| 106 // source (integer), and if the URL represents an app, records the action for | |
| 107 // UMA. | |
| 108 void HandleRecordAppLaunchByURL(const base::ListValue* args); | |
| 109 | |
| 105 // Register app launcher preferences. | 110 // Register app launcher preferences. |
| 106 static void RegisterUserPrefs(PrefService* pref_service); | 111 static void RegisterUserPrefs(PrefService* pref_service); |
| 107 | 112 |
| 108 private: | 113 private: |
| 109 // Records a web store launch in the appropriate histograms. |promo_active| | 114 // Records a web store launch in the appropriate histograms. |promo_active| |
| 110 // specifies if the web store promotion was active. | 115 // specifies if the web store promotion was active. |
| 111 static void RecordWebStoreLaunch(bool promo_active); | 116 static void RecordWebStoreLaunch(bool promo_active); |
| 112 | 117 |
| 113 // Records an app launch in the corresponding |bucket| of the app launch | 118 // Records an app launch in the corresponding |bucket| of the app launch |
| 114 // histogram. |promo_active| specifies if the web store promotion was active. | 119 // histogram. |promo_active| specifies if the web store promotion was active. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 // refreshing. This is useful when making many batch updates to avoid flicker. | 179 // refreshing. This is useful when making many batch updates to avoid flicker. |
| 175 bool ignore_changes_; | 180 bool ignore_changes_; |
| 176 | 181 |
| 177 // Hold state for favicon requests. | 182 // Hold state for favicon requests. |
| 178 CancelableRequestConsumerTSimple<WebApplicationInfo*> favicon_consumer_; | 183 CancelableRequestConsumerTSimple<WebApplicationInfo*> favicon_consumer_; |
| 179 | 184 |
| 180 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 185 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
| 181 }; | 186 }; |
| 182 | 187 |
| 183 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 188 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| OLD | NEW |