Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / extensions / api / management / chrome_management_api_delegate.h
blob1c16eab76285a469645c6a71232e4d46a7a43454
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_
8 #include "base/task/cancelable_task_tracker.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "chrome/browser/extensions/extension_uninstall_dialog.h"
11 #include "extensions/browser/api/management/management_api_delegate.h"
13 namespace favicon_base {
14 struct FaviconImageResult;
15 } // namespace favicon_base
17 class ChromeManagementAPIDelegate : public extensions::ManagementAPIDelegate {
18 public:
19 ChromeManagementAPIDelegate();
20 ~ChromeManagementAPIDelegate() override;
22 // ManagementAPIDelegate.
23 bool LaunchAppFunctionDelegate(
24 const extensions::Extension* extension,
25 content::BrowserContext* context) const override;
26 GURL GetFullLaunchURL(const extensions::Extension* extension) const override;
27 extensions::LaunchType GetLaunchType(
28 const extensions::ExtensionPrefs* prefs,
29 const extensions::Extension* extension) const override;
30 void GetPermissionWarningsByManifestFunctionDelegate(
31 extensions::ManagementGetPermissionWarningsByManifestFunction* function,
32 const std::string& manifest_str) const override;
33 scoped_ptr<extensions::InstallPromptDelegate> SetEnabledFunctionDelegate(
34 extensions::ManagementSetEnabledFunction* function,
35 const extensions::Extension* extension) const override;
36 scoped_ptr<extensions::RequirementsChecker> CreateRequirementsChecker()
37 const override;
38 scoped_ptr<extensions::UninstallDialogDelegate> UninstallFunctionDelegate(
39 extensions::ManagementUninstallFunctionBase* function,
40 const extensions::Extension* target_extension,
41 bool show_programmatic_uninstall_ui) const override;
42 bool CreateAppShortcutFunctionDelegate(
43 extensions::ManagementCreateAppShortcutFunction* function,
44 const extensions::Extension* extension) const override;
45 scoped_ptr<extensions::AppForLinkDelegate> GenerateAppForLinkFunctionDelegate(
46 extensions::ManagementGenerateAppForLinkFunction* function,
47 content::BrowserContext* context,
48 const std::string& title,
49 const GURL& launch_url) const override;
50 bool CanHostedAppsOpenInWindows() const override;
51 bool IsNewBookmarkAppsEnabled() const override;
52 void EnableExtension(content::BrowserContext* context,
53 const std::string& extension_id) const override;
54 void DisableExtension(
55 content::BrowserContext* context,
56 const std::string& extension_id,
57 extensions::Extension::DisableReason disable_reason) const override;
58 bool UninstallExtension(content::BrowserContext* context,
59 const std::string& transient_extension_id,
60 extensions::UninstallReason reason,
61 const base::Closure& deletion_done_callback,
62 base::string16* error) const override;
63 void SetLaunchType(content::BrowserContext* context,
64 const std::string& extension_id,
65 extensions::LaunchType launch_type) const override;
66 GURL GetIconURL(const extensions::Extension* extension,
67 int icon_size,
68 ExtensionIconSet::MatchType match,
69 bool grayscale,
70 bool* exists) const override;
73 #endif // CHROME_BROWSER_EXTENSIONS_API_MANAGEMENT_CHROME_MANAGEMENT_API_DELEGATE_H_