Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/ui/webui/ntp/app_launcher_handler.h

Issue 8198003: Convert app_launch_index and page_index from int to StringOrdinal. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Changing ..MinAndMax.. to ..MinOrMax.. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/extensions/extension_install_ui.h" 12 #include "chrome/browser/extensions/extension_install_ui.h"
13 #include "chrome/browser/extensions/extension_uninstall_dialog.h" 13 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
14 #include "chrome/browser/favicon/favicon_service.h" 14 #include "chrome/browser/favicon/favicon_service.h"
15 #include "chrome/browser/prefs/pref_change_registrar.h" 15 #include "chrome/browser/prefs/pref_change_registrar.h"
16 #include "chrome/common/extensions/extension.h" 16 #include "chrome/common/extensions/extension.h"
17 #include "chrome/common/extensions/extension_constants.h" 17 #include "chrome/common/extensions/extension_constants.h"
18 #include "chrome/common/string_ordinal.h"
18 #include "content/browser/cancelable_request.h" 19 #include "content/browser/cancelable_request.h"
19 #include "content/browser/webui/web_ui.h" 20 #include "content/browser/webui/web_ui.h"
20 #include "content/public/browser/notification_observer.h" 21 #include "content/public/browser/notification_observer.h"
21 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
22 23
23 class AppNotification; 24 class AppNotification;
24 class ExtensionService; 25 class ExtensionService;
25 class PrefChangeRegistrar; 26 class PrefChangeRegistrar;
26 class Profile; 27 class Profile;
27 28
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 void HandleNotificationClose(const base::ListValue* args); 108 void HandleNotificationClose(const base::ListValue* args);
108 109
109 // Register app launcher preferences. 110 // Register app launcher preferences.
110 static void RegisterUserPrefs(PrefService* pref_service); 111 static void RegisterUserPrefs(PrefService* pref_service);
111 112
112 private: 113 private:
113 struct AppInstallInfo { 114 struct AppInstallInfo {
114 bool is_bookmark_app; 115 bool is_bookmark_app;
115 string16 title; 116 string16 title;
116 GURL app_url; 117 GURL app_url;
117 int page_index; 118 StringOrdinal page_ordinal;
118 }; 119 };
119 120
120 // Records a web store launch in the appropriate histograms. |promo_active| 121 // Records a web store launch in the appropriate histograms. |promo_active|
121 // specifies if the web store promotion was active. 122 // specifies if the web store promotion was active.
122 static void RecordWebStoreLaunch(bool promo_active); 123 static void RecordWebStoreLaunch(bool promo_active);
123 124
124 // Records an app launch in the corresponding |bucket| of the app launch 125 // Records an app launch in the corresponding |bucket| of the app launch
125 // histogram. |promo_active| specifies if the web store promotion was active. 126 // histogram. |promo_active| specifies if the web store promotion was active.
126 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket); 127 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket);
127 128
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 // when the app is added to the page (via getAppsCallback or appAdded). 197 // when the app is added to the page (via getAppsCallback or appAdded).
197 std::string highlight_app_id_; 198 std::string highlight_app_id_;
198 199
199 // Hold state for favicon requests. 200 // Hold state for favicon requests.
200 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; 201 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_;
201 202
202 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 203 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
203 }; 204 };
204 205
205 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ 206 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698