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

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

Issue 6825052: Update the web store promo to be clearer and configurable at run-time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate Aaron's feedback. Created 9 years, 8 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
« no previous file with comments | « chrome/browser/resources/ntp/apps.js ('k') | chrome/browser/ui/webui/app_launcher_handler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_APP_LAUNCHER_HANDLER_H_ 5 #ifndef CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_HANDLER_H_
6 #define CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_HANDLER_H_ 6 #define CHROME_BROWSER_UI_WEBUI_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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 virtual void RegisterMessages(); 48 virtual void RegisterMessages();
49 49
50 // NotificationObserver 50 // NotificationObserver
51 virtual void Observe(NotificationType type, 51 virtual void Observe(NotificationType type,
52 const NotificationSource& source, 52 const NotificationSource& source,
53 const NotificationDetails& details); 53 const NotificationDetails& details);
54 54
55 // Populate the given dictionary with all installed app info. 55 // Populate the given dictionary with all installed app info.
56 void FillAppDictionary(DictionaryValue* value); 56 void FillAppDictionary(DictionaryValue* value);
57 57
58 // Populate the given dictionary with the web store promo content.
59 void FillPromoDictionary(DictionaryValue* value);
60
58 // Callback for the "getApps" message. 61 // Callback for the "getApps" message.
59 void HandleGetApps(const ListValue* args); 62 void HandleGetApps(const ListValue* args);
60 63
61 // Callback for the "launchApp" message. 64 // Callback for the "launchApp" message.
62 void HandleLaunchApp(const ListValue* args); 65 void HandleLaunchApp(const ListValue* args);
63 66
64 // Callback for the "setLaunchType" message. 67 // Callback for the "setLaunchType" message.
65 void HandleSetLaunchType(const ListValue* args); 68 void HandleSetLaunchType(const ListValue* args);
66 69
67 // Callback for the "uninstallApp" message. 70 // Callback for the "uninstallApp" message.
68 void HandleUninstallApp(const ListValue* args); 71 void HandleUninstallApp(const ListValue* args);
69 72
70 // Callback for the "hideAppPromo" message. 73 // Callback for the "hideAppPromo" message.
71 void HandleHideAppsPromo(const ListValue* args); 74 void HandleHideAppsPromo(const ListValue* args);
72 75
73 // Callback for the "createAppShortcut" message. 76 // Callback for the "createAppShortcut" message.
74 void HandleCreateAppShortcut(const ListValue* args); 77 void HandleCreateAppShortcut(const ListValue* args);
75 78
76 // Callback for the "reorderApps" message. 79 // Callback for the "reorderApps" message.
77 void HandleReorderApps(const ListValue* args); 80 void HandleReorderApps(const ListValue* args);
78 81
79 // Callback for the "setPageIndex" message. 82 // Callback for the "setPageIndex" message.
80 void HandleSetPageIndex(const ListValue* args); 83 void HandleSetPageIndex(const ListValue* args);
81 84
85 // Callback for the "promoSeen" message.
86 void HandlePromoSeen(const ListValue* args);
87
82 private: 88 private:
83 // Records a web store launch in the appropriate histograms. |promo_active| 89 // Records a web store launch in the appropriate histograms. |promo_active|
84 // specifies if the web store promotion was active. 90 // specifies if the web store promotion was active.
85 static void RecordWebStoreLaunch(bool promo_active); 91 static void RecordWebStoreLaunch(bool promo_active);
86 92
87 // Records an app launch in the corresponding |bucket| of the app launch 93 // Records an app launch in the corresponding |bucket| of the app launch
88 // histogram. |promo_active| specifies if the web store promotion was active. 94 // histogram. |promo_active| specifies if the web store promotion was active.
89 static void RecordAppLaunchByID(bool promo_active, 95 static void RecordAppLaunchByID(bool promo_active,
90 extension_misc::AppLaunchBucket bucket); 96 extension_misc::AppLaunchBucket bucket);
91 97
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 bool promo_active_; 146 bool promo_active_;
141 147
142 // When true, we ignore changes to the underlying data rather than immediately 148 // When true, we ignore changes to the underlying data rather than immediately
143 // refreshing. This is useful when making many batch updates to avoid flicker. 149 // refreshing. This is useful when making many batch updates to avoid flicker.
144 bool ignore_changes_; 150 bool ignore_changes_;
145 151
146 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); 152 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler);
147 }; 153 };
148 154
149 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_HANDLER_H_ 155 #endif // CHROME_BROWSER_UI_WEBUI_APP_LAUNCHER_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/resources/ntp/apps.js ('k') | chrome/browser/ui/webui/app_launcher_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698