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

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

Issue 696543002: Move the chrome.management API to extensions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
Index: chrome/browser/extensions/api/management/chrome_management_api_delegate.h
diff --git a/chrome/browser/extensions/api/management/chrome_management_api_delegate.h b/chrome/browser/extensions/api/management/chrome_management_api_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..4f4a18a0571ecca15ef65c1336347d764733f5b2
--- /dev/null
+++ b/chrome/browser/extensions/api/management/chrome_management_api_delegate.h
@@ -0,0 +1,71 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_
+#define CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_
+
+#include "base/task/cancelable_task_tracker.h"
+#include "chrome/browser/extensions/extension_install_prompt.h"
+#include "chrome/browser/extensions/extension_uninstall_dialog.h"
+#include "extensions/browser/api/management/management_api_delegate.h"
+
+namespace favicon_base {
+struct FaviconImageResult;
+} // namespace favicon_base
+
+namespace extensions {
Ken Rockot(use gerrit already) 2014/11/03 17:22:57 nit: I'd like to stop introducing new code into th
+
+class ChromeManagementAPIDelegate : public ManagementAPIDelegate {
+ public:
+ ChromeManagementAPIDelegate();
+ ~ChromeManagementAPIDelegate() override;
+
+ // ManagementAPIDelegate.
+ bool LaunchAppFunctionDelegate(
+ const Extension* extension,
+ content::BrowserContext* context) const override;
+ GURL GetFullLaunchURL(const Extension* extension) const override;
+ LaunchType GetLaunchType(const ExtensionPrefs* prefs,
+ const Extension* extension) const override;
+ void GetPermissionWarningsByManifestFunctionDelegate(
+ ManagementGetPermissionWarningsByManifestFunction* function,
+ const std::string& manifest_str) const override;
+ scoped_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate(
+ ManagementSetEnabledFunction* function,
+ const Extension* extension) const override;
+ scoped_ptr<UninstallDialogDelegate> UninstallFunctionDelegate(
+ extensions::ManagementUninstallFunctionBase* function,
+ const std::string& target_extension_id) const override;
+ bool CreateAppShortcutFunctionDelegate(
+ ManagementCreateAppShortcutFunction* function,
+ const Extension* extension) const override;
+ scoped_ptr<AppForLinkDelegate> GenerateAppForLinkFunctionDelegate(
+ ManagementGenerateAppForLinkFunction* function,
+ content::BrowserContext* context,
+ const std::string& title,
+ const GURL& launch_url) const override;
+ bool IsStreamlinedHostedAppsEnabled() const override;
+ void EnableExtension(content::BrowserContext* context,
+ const std::string& extension_id) const override;
+ void DisableExtension(content::BrowserContext* context,
+ const std::string& extension_id,
+ Extension::DisableReason disable_reason) const override;
+ bool UninstallExtension(content::BrowserContext* context,
+ const std::string& transient_extension_id,
+ UninstallReason reason,
+ const base::Closure& deletion_done_callback,
+ base::string16* error) const override;
+ void SetLaunchType(content::BrowserContext* context,
+ const std::string& extension_id,
+ LaunchType launch_type) const override;
+ GURL GetIconURL(const Extension* extension,
+ int icon_size,
+ ExtensionIconSet::MatchType match,
+ bool grayscale,
+ bool* exists) const override;
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698