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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 DictionaryValue* value); | 44 DictionaryValue* value); |
45 | 45 |
46 // Callback for pings related to launching apps on the NTP. | 46 // Callback for pings related to launching apps on the NTP. |
47 static bool HandlePing(Profile* profile, const std::string& path); | 47 static bool HandlePing(Profile* profile, const std::string& path); |
48 | 48 |
49 // WebUIMessageHandler implementation. | 49 // WebUIMessageHandler implementation. |
50 virtual WebUIMessageHandler* Attach(WebUI* web_ui); | 50 virtual WebUIMessageHandler* Attach(WebUI* web_ui); |
51 virtual void RegisterMessages(); | 51 virtual void RegisterMessages(); |
52 | 52 |
53 // NotificationObserver | 53 // NotificationObserver |
54 virtual void Observe(NotificationType type, | 54 virtual void Observe(int type, |
55 const NotificationSource& source, | 55 const NotificationSource& source, |
56 const NotificationDetails& details); | 56 const NotificationDetails& details); |
57 | 57 |
58 // Populate the given dictionary with all installed app info. | 58 // Populate the given dictionary with all installed app info. |
59 void FillAppDictionary(DictionaryValue* value); | 59 void FillAppDictionary(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 DictionaryValue* GetAppInfo(const Extension* extension); | 64 DictionaryValue* GetAppInfo(const Extension* extension); |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 bool promo_active_; | 161 bool promo_active_; |
162 | 162 |
163 // When true, we ignore changes to the underlying data rather than immediately | 163 // When true, we ignore changes to the underlying data rather than immediately |
164 // refreshing. This is useful when making many batch updates to avoid flicker. | 164 // refreshing. This is useful when making many batch updates to avoid flicker. |
165 bool ignore_changes_; | 165 bool ignore_changes_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); | 167 DISALLOW_COPY_AND_ASSIGN(AppLauncherHandler); |
168 }; | 168 }; |
169 | 169 |
170 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ | 170 #endif // CHROME_BROWSER_UI_WEBUI_NTP_APP_LAUNCHER_HANDLER_H_ |
OLD | NEW |