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

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: make shouldShowApps a pref 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 13 matching lines...) Expand all
24 class ExtensionEnableFlow; 24 class ExtensionEnableFlow;
25 class ExtensionService; 25 class ExtensionService;
26 class PrefChangeRegistrar; 26 class PrefChangeRegistrar;
27 class PrefServiceSyncable; 27 class PrefServiceSyncable;
28 class Profile; 28 class Profile;
29 29
30 namespace extensions { 30 namespace extensions {
31 class AppNotification; 31 class AppNotification;
32 } 32 }
33 33
34 class AppsPagePresenceHandler : public content::WebUIMessageHandler {
Evan Stade 2013/01/23 23:34:24 why is this separate from AppLauncherHandler?
jeremya 2013/01/24 02:40:04 Because AppLauncherHandler isn't always present. P
35 public:
36 AppsPagePresenceHandler();
37 virtual ~AppsPagePresenceHandler();
38
39 // WebUIMessageHandler implementation.
40 virtual void RegisterMessages() OVERRIDE;
41
42 // Callback for the "getShouldShowApps" message.
43 void HandleGetShouldShowApps(const base::ListValue* args);
44
45 private:
46 // Callback for extensions::GetIsAppLauncherEnabled().
47 void GotIsAppLauncherEnabled(bool is_enabled);
48
49 DISALLOW_COPY_AND_ASSIGN(AppsPagePresenceHandler);
50 };
51
34 // The handler for Javascript messages related to the "apps" view. 52 // The handler for Javascript messages related to the "apps" view.
35 class AppLauncherHandler : public content::WebUIMessageHandler, 53 class AppLauncherHandler : public content::WebUIMessageHandler,
36 public ExtensionUninstallDialog::Delegate, 54 public ExtensionUninstallDialog::Delegate,
37 public ExtensionEnableFlowDelegate, 55 public ExtensionEnableFlowDelegate,
38 public content::NotificationObserver { 56 public content::NotificationObserver {
39 public: 57 public:
40 explicit AppLauncherHandler(ExtensionService* extension_service); 58 explicit AppLauncherHandler(ExtensionService* extension_service);
41 virtual ~AppLauncherHandler(); 59 virtual ~AppLauncherHandler();
42 60
43 // Populate a dictionary with the information from an extension. 61 // Populate a dictionary with the information from an extension.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 // when the app is added to the page (via getAppsCallback or appAdded). 219 // when the app is added to the page (via getAppsCallback or appAdded).
202 std::string highlight_app_id_; 220 std::string highlight_app_id_;
203 221
204 // Used for favicon loading tasks. 222 // Used for favicon loading tasks.
205 CancelableTaskTracker cancelable_task_tracker_; 223 CancelableTaskTracker cancelable_task_tracker_;
206 224
207 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 225 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
208 }; 226 };
209 227
210 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ 228 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698