| OLD | NEW |
| 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 "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "chrome/browser/extensions/extension_app_api.h" | 10 #include "chrome/browser/extensions/extension_app_api.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 DictionaryValue* value); | 43 DictionaryValue* value); |
| 44 | 44 |
| 45 // Callback for pings related to launching apps on the NTP. | 45 // Callback for pings related to launching apps on the NTP. |
| 46 static bool HandlePing(Profile* profile, const std::string& path); | 46 static bool HandlePing(Profile* profile, const std::string& path); |
| 47 | 47 |
| 48 // WebUIMessageHandler implementation. | 48 // WebUIMessageHandler implementation. |
| 49 virtual WebUIMessageHandler* Attach(WebUI* web_ui); | 49 virtual WebUIMessageHandler* Attach(WebUI* web_ui); |
| 50 virtual void RegisterMessages(); | 50 virtual void RegisterMessages(); |
| 51 | 51 |
| 52 // NotificationObserver | 52 // NotificationObserver |
| 53 virtual void Observe(NotificationType type, | 53 virtual void Observe(int type, |
| 54 const NotificationSource& source, | 54 const NotificationSource& source, |
| 55 const NotificationDetails& details); | 55 const NotificationDetails& details); |
| 56 | 56 |
| 57 // Populate the given dictionary with all installed app info. | 57 // Populate the given dictionary with all installed app info. |
| 58 void FillAppDictionary(DictionaryValue* value); | 58 void FillAppDictionary(DictionaryValue* value); |
| 59 | 59 |
| 60 // Create a dictionary value for the given extension. May return NULL, e.g. if | 60 // Create a dictionary value for the given extension. May return NULL, e.g. if |
| 61 // the given extension is not an app. If non-NULL, the caller assumes | 61 // the given extension is not an app. If non-NULL, the caller assumes |
| 62 // ownership of the pointer. | 62 // ownership of the pointer. |
| 63 DictionaryValue* GetAppInfo(const Extension* extension); | 63 DictionaryValue* GetAppInfo(const Extension* extension); |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 bool promo_active_; | 154 bool promo_active_; |
| 155 | 155 |
| 156 // When true, we ignore changes to the underlying data rather than immediately | 156 // When true, we ignore changes to the underlying data rather than immediately |
| 157 // refreshing. This is useful when making many batch updates to avoid flicker. | 157 // refreshing. This is useful when making many batch updates to avoid flicker. |
| 158 bool ignore_changes_; | 158 bool ignore_changes_; |
| 159 | 159 |
| 160 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 160 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
| 161 }; | 161 }; |
| 162 | 162 |
| 163 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 163 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
| OLD | NEW |