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

Unified Diff: chrome/browser/extensions/api/management/management_api.h

Issue 266353006: Add generateAppForLink function in chrome.management (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/management/management_api.h
===================================================================
--- chrome/browser/extensions/api/management/management_api.h (revision 271412)
+++ chrome/browser/extensions/api/management/management_api.h (working copy)
@@ -6,9 +6,12 @@
#define CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_MANAGEMENT_API_H_
#include "base/compiler_specific.h"
+#include "base/task/cancelable_task_tracker.h"
+#include "chrome/browser/extensions/bookmark_app_helper.h"
#include "chrome/browser/extensions/chrome_extension_function.h"
#include "chrome/browser/extensions/extension_install_prompt.h"
#include "chrome/browser/extensions/extension_uninstall_dialog.h"
+#include "components/favicon_base/favicon_types.h"
#include "components/keyed_service/core/keyed_service.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
@@ -17,6 +20,7 @@
class ExtensionService;
class ExtensionUninstallDialog;
+class WebApplicationInfo;
namespace extensions {
@@ -189,6 +193,34 @@
virtual bool RunAsync() OVERRIDE;
};
+class ManagementGenerateAppForLinkFunction : public AsyncManagementFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("management.generateAppForLink",
+ MANAGEMENT_GENERATEAPPFORLINK);
+
+ ManagementGenerateAppForLinkFunction();
+
+ protected:
+ virtual ~ManagementGenerateAppForLinkFunction();
+
+ virtual bool RunAsync() OVERRIDE;
+
+ private:
+ void OnFaviconForApp(const favicon_base::FaviconImageResult& image_result);
+
+ void FinishCreateBookmarkApp(const extensions::Extension* extension,
+ const WebApplicationInfo& web_app_info);
+
+ std::string title_;
+
+ GURL launch_url_;
benwells 2014/05/28 01:04:18 Nit: no need for the blank line between these two.
wjywbs 2014/05/28 01:19:01 Done.
+
+ scoped_ptr<BookmarkAppHelper> bookmark_app_helper_;
+
+ // Used for favicon loading tasks.
+ base::CancelableTaskTracker cancelable_task_tracker_;
+};
+
class ManagementEventRouter : public content::NotificationObserver {
public:
explicit ManagementEventRouter(Profile* profile);
« no previous file with comments | « no previous file | chrome/browser/extensions/api/management/management_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698