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

Side by Side Diff: extensions/browser/api/management/management_api_delegate.h

Issue 2783813002: Move ChromeRequirementsChecker to //extensions as a PreloadCheck (Closed)
Patch Set: rebase? Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « extensions/browser/api/management/management_api.cc ('k') | extensions/browser/preload_check.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ 5 #ifndef EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_
6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ 6 #define EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "extensions/browser/uninstall_reason.h" 9 #include "extensions/browser/uninstall_reason.h"
10 #include "extensions/common/constants.h" 10 #include "extensions/common/constants.h"
11 #include "extensions/common/extension.h" 11 #include "extensions/common/extension.h"
12 #include "extensions/common/extension_icon_set.h" 12 #include "extensions/common/extension_icon_set.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 namespace content { 15 namespace content {
16 class BrowserContext; 16 class BrowserContext;
17 class WebContents; 17 class WebContents;
18 } // namespace content 18 } // namespace content
19 19
20 namespace extensions { 20 namespace extensions {
21 21
22 class Extension; 22 class Extension;
23 class ExtensionPrefs; 23 class ExtensionPrefs;
24 class ManagementCreateAppShortcutFunction; 24 class ManagementCreateAppShortcutFunction;
25 class ManagementGenerateAppForLinkFunction; 25 class ManagementGenerateAppForLinkFunction;
26 class ManagementGetPermissionWarningsByManifestFunction; 26 class ManagementGetPermissionWarningsByManifestFunction;
27 class ManagementUninstallFunctionBase; 27 class ManagementUninstallFunctionBase;
28 class RequirementsChecker;
29 28
30 // Manages the lifetime of the install prompt. 29 // Manages the lifetime of the install prompt.
31 class InstallPromptDelegate { 30 class InstallPromptDelegate {
32 public: 31 public:
33 virtual ~InstallPromptDelegate() {} 32 virtual ~InstallPromptDelegate() {}
34 }; 33 };
35 34
36 // Manages the lifetime of the uninstall prompt. 35 // Manages the lifetime of the uninstall prompt.
37 class UninstallDialogDelegate { 36 class UninstallDialogDelegate {
38 public: 37 public:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const std::string& manifest_str) const = 0; 75 const std::string& manifest_str) const = 0;
77 76
78 // Used to show a dialog prompt in chrome when management.setEnabled extension 77 // Used to show a dialog prompt in chrome when management.setEnabled extension
79 // function is called. 78 // function is called.
80 virtual std::unique_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate( 79 virtual std::unique_ptr<InstallPromptDelegate> SetEnabledFunctionDelegate(
81 content::WebContents* web_contents, 80 content::WebContents* web_contents,
82 content::BrowserContext* browser_context, 81 content::BrowserContext* browser_context,
83 const Extension* extension, 82 const Extension* extension,
84 const base::Callback<void(bool)>& callback) const = 0; 83 const base::Callback<void(bool)>& callback) const = 0;
85 84
86 // Returns a new RequirementsChecker.
87 virtual std::unique_ptr<RequirementsChecker> CreateRequirementsChecker()
88 const = 0;
89
90 // Enables the extension identified by |extension_id|. 85 // Enables the extension identified by |extension_id|.
91 virtual void EnableExtension(content::BrowserContext* context, 86 virtual void EnableExtension(content::BrowserContext* context,
92 const std::string& extension_id) const = 0; 87 const std::string& extension_id) const = 0;
93 88
94 // Disables the extension identified by |extension_id|. 89 // Disables the extension identified by |extension_id|.
95 virtual void DisableExtension( 90 virtual void DisableExtension(
96 content::BrowserContext* context, 91 content::BrowserContext* context,
97 const std::string& extension_id, 92 const std::string& extension_id,
98 Extension::DisableReason disable_reason) const = 0; 93 Extension::DisableReason disable_reason) const = 0;
99 94
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // Forwards the call to ExtensionIconSource::GetIconURL in chrome. 127 // Forwards the call to ExtensionIconSource::GetIconURL in chrome.
133 virtual GURL GetIconURL(const Extension* extension, 128 virtual GURL GetIconURL(const Extension* extension,
134 int icon_size, 129 int icon_size,
135 ExtensionIconSet::MatchType match, 130 ExtensionIconSet::MatchType match,
136 bool grayscale) const = 0; 131 bool grayscale) const = 0;
137 }; 132 };
138 133
139 } // namespace extensions 134 } // namespace extensions
140 135
141 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_ 136 #endif // EXTENSIONS_BROWSER_API_MANAGEMENT_MANAGEMENT_API_DELEGATE_H_
OLDNEW
« no previous file with comments | « extensions/browser/api/management/management_api.cc ('k') | extensions/browser/preload_check.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698