| OLD | NEW |
| 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // The handler for Javascript messages related to the "apps" view. | 29 // The handler for Javascript messages related to the "apps" view. |
| 30 class AppLauncherHandler : public content::WebUIMessageHandler, | 30 class AppLauncherHandler : public content::WebUIMessageHandler, |
| 31 public ExtensionUninstallDialog::Delegate, | 31 public ExtensionUninstallDialog::Delegate, |
| 32 public ExtensionInstallUI::Delegate, | 32 public ExtensionInstallUI::Delegate, |
| 33 public content::NotificationObserver { | 33 public content::NotificationObserver { |
| 34 public: | 34 public: |
| 35 explicit AppLauncherHandler(ExtensionService* extension_service); | 35 explicit AppLauncherHandler(ExtensionService* extension_service); |
| 36 virtual ~AppLauncherHandler(); | 36 virtual ~AppLauncherHandler(); |
| 37 | 37 |
| 38 // Whether the app should be excluded from the "apps" list because | |
| 39 // it is special (such as the Web Store app). | |
| 40 static bool IsAppExcludedFromList(const Extension* extension); | |
| 41 | |
| 42 // Populate a dictionary with the information from an extension. | 38 // Populate a dictionary with the information from an extension. |
| 43 static void CreateAppInfo( | 39 static void CreateAppInfo( |
| 44 const Extension* extension, | 40 const Extension* extension, |
| 45 const AppNotification* notification, | 41 const AppNotification* notification, |
| 46 ExtensionService* service, | 42 ExtensionService* service, |
| 47 base::DictionaryValue* value); | 43 base::DictionaryValue* value); |
| 48 | 44 |
| 49 // WebUIMessageHandler implementation. | 45 // WebUIMessageHandler implementation. |
| 50 virtual void RegisterMessages() OVERRIDE; | 46 virtual void RegisterMessages() OVERRIDE; |
| 51 | 47 |
| (...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 // when the app is added to the page (via getAppsCallback or appAdded). | 201 // when the app is added to the page (via getAppsCallback or appAdded). |
| 206 std::string highlight_app_id_; | 202 std::string highlight_app_id_; |
| 207 | 203 |
| 208 // Hold state for favicon requests. | 204 // Hold state for favicon requests. |
| 209 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; | 205 CancelableRequestConsumerTSimple<AppInstallInfo*> favicon_consumer_; |
| 210 | 206 |
| 211 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 207 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
| 212 }; | 208 }; |
| 213 | 209 |
| 214 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 210 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| OLD | NEW |