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

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

Issue 11953021: Don't show the apps page on the NTP if the app launcher is installed. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: pref -> app_launcher Created 7 years, 11 months 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) 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_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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 void FillAppDictionary(base::DictionaryValue* value); 59 void FillAppDictionary(base::DictionaryValue* value);
60 60
61 // Create a dictionary value for the given extension. May return NULL, e.g. if 61 // Create a dictionary value for the given extension. May return NULL, e.g. if
62 // the given extension is not an app. If non-NULL, the caller assumes 62 // the given extension is not an app. If non-NULL, the caller assumes
63 // ownership of the pointer. 63 // ownership of the pointer.
64 base::DictionaryValue* GetAppInfo(const extensions::Extension* extension); 64 base::DictionaryValue* GetAppInfo(const extensions::Extension* extension);
65 65
66 // Populate the given dictionary with the web store promo content. 66 // Populate the given dictionary with the web store promo content.
67 void FillPromoDictionary(base::DictionaryValue* value); 67 void FillPromoDictionary(base::DictionaryValue* value);
68 68
69 // Callback for the "getShouldShowApps" message.
70 void HandleGetShouldShowApps(const base::ListValue* args);
71
69 // Callback for the "getApps" message. 72 // Callback for the "getApps" message.
70 void HandleGetApps(const base::ListValue* args); 73 void HandleGetApps(const base::ListValue* args);
71 74
72 // Callback for the "launchApp" message. 75 // Callback for the "launchApp" message.
73 void HandleLaunchApp(const base::ListValue* args); 76 void HandleLaunchApp(const base::ListValue* args);
74 77
75 // Callback for the "setLaunchType" message. 78 // Callback for the "setLaunchType" message.
76 void HandleSetLaunchType(const base::ListValue* args); 79 void HandleSetLaunchType(const base::ListValue* args);
77 80
78 // Callback for the "uninstallApp" message. 81 // Callback for the "uninstallApp" message.
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 struct AppInstallInfo { 117 struct AppInstallInfo {
115 AppInstallInfo(); 118 AppInstallInfo();
116 ~AppInstallInfo(); 119 ~AppInstallInfo();
117 120
118 bool is_bookmark_app; 121 bool is_bookmark_app;
119 string16 title; 122 string16 title;
120 GURL app_url; 123 GURL app_url;
121 syncer::StringOrdinal page_ordinal; 124 syncer::StringOrdinal page_ordinal;
122 }; 125 };
123 126
127 // Callback for extensions::GetIsAppLauncherEnabled().
128 void GotIsAppLauncherEnabled(bool is_enabled);
129
124 // Reset some instance flags we use to track the currently uninstalling app. 130 // Reset some instance flags we use to track the currently uninstalling app.
125 void CleanupAfterUninstall(); 131 void CleanupAfterUninstall();
126 132
127 // Records a web store launch in the appropriate histograms. 133 // Records a web store launch in the appropriate histograms.
128 static void RecordWebStoreLaunch(); 134 static void RecordWebStoreLaunch();
129 135
130 // Records an app launch in the corresponding |bucket| of the app launch 136 // Records an app launch in the corresponding |bucket| of the app launch
131 // histogram. |promo_active| specifies if the web store promotion was active. 137 // histogram. |promo_active| specifies if the web store promotion was active.
132 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket); 138 static void RecordAppLaunchByID(extension_misc::AppLaunchBucket bucket);
133 139
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // when the app is added to the page (via getAppsCallback or appAdded). 207 // when the app is added to the page (via getAppsCallback or appAdded).
202 std::string highlight_app_id_; 208 std::string highlight_app_id_;
203 209
204 // Used for favicon loading tasks. 210 // Used for favicon loading tasks.
205 CancelableTaskTracker cancelable_task_tracker_; 211 CancelableTaskTracker cancelable_task_tracker_;
206 212
207 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 213 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
208 }; 214 };
209 215
210 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ 216 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698