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_install_ui.h" | 10 #include "chrome/browser/extensions/extension_install_ui.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void HandleRecordAppLaunchByURL(const base::ListValue* args); | 112 void HandleRecordAppLaunchByURL(const base::ListValue* args); |
113 | 113 |
114 // Register app launcher preferences. | 114 // Register app launcher preferences. |
115 static void RegisterUserPrefs(PrefService* pref_service); | 115 static void RegisterUserPrefs(PrefService* pref_service); |
116 | 116 |
117 private: | 117 private: |
118 struct AppInstallInfo { | 118 struct AppInstallInfo { |
119 bool is_bookmark_app; | 119 bool is_bookmark_app; |
120 string16 title; | 120 string16 title; |
121 GURL app_url; | 121 GURL app_url; |
122 int page_index; | 122 std::string page_index; |
123 }; | 123 }; |
124 | 124 |
125 // Records a web store launch in the appropriate histograms. |promo_active| | 125 // Records a web store launch in the appropriate histograms. |promo_active| |
126 // specifies if the web store promotion was active. | 126 // specifies if the web store promotion was active. |
127 static void RecordWebStoreLaunch(bool promo_active); | 127 static void RecordWebStoreLaunch(bool promo_active); |
128 | 128 |
129 // Records an app launch in the corresponding |bucket| of the app launch | 129 // Records an app launch in the corresponding |bucket| of the app launch |
130 // histogram. |promo_active| specifies if the web store promotion was active. | 130 // histogram. |promo_active| specifies if the web store promotion was active. |
131 static void RecordAppLaunchByID(bool promo_active, | 131 static void RecordAppLaunchByID(bool promo_active, |
132 extension_misc::AppLaunchBucket bucket); | 132 extension_misc::AppLaunchBucket bucket); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 // when the app is added to the page (via getAppsCallback or appAdded). | 205 // when the app is added to the page (via getAppsCallback or appAdded). |
206 std::string highlight_app_id_; | 206 std::string highlight_app_id_; |
207 | 207 |
208 // Hold state for favicon requests. | 208 // Hold state for favicon requests. |
209 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; | 209 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; |
210 | 210 |
211 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 211 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
212 }; | 212 }; |
213 | 213 |
214 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 214 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
OLD | NEW |