1 // Copyright 2013 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 APPS_SHELL_SHELL_EXTENSIONS_CLIENT_H_
6 #define APPS_SHELL_SHELL_EXTENSIONS_CLIENT_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "extensions/common/extensions_client.h"
14 // The app_shell implementation of ExtensionsClient.
15 class ShellExtensionsClient
: public extensions::ExtensionsClient
{
17 ShellExtensionsClient();
18 virtual ~ShellExtensionsClient();
20 // extensions::ExtensionsClient overrides:
21 virtual void Initialize() OVERRIDE
;
22 virtual const extensions::PermissionsProvider
& GetPermissionsProvider() const
24 virtual const extensions::PermissionMessageProvider
&
25 GetPermissionMessageProvider() const OVERRIDE
;
26 virtual extensions::FeatureProvider
* GetFeatureProviderByName(
27 const std::string
& name
) const OVERRIDE
;
28 virtual void FilterHostPermissions(
29 const extensions::URLPatternSet
& hosts
,
30 extensions::URLPatternSet
* new_hosts
,
31 std::set
<extensions::PermissionMessage
>* messages
) const OVERRIDE
;
32 virtual void SetScriptingWhitelist(const ScriptingWhitelist
& whitelist
)
34 virtual const ScriptingWhitelist
& GetScriptingWhitelist() const OVERRIDE
;
35 virtual extensions::URLPatternSet
GetPermittedChromeSchemeHosts(
36 const extensions::Extension
* extension
,
37 const extensions::APIPermissionSet
& api_permissions
) const OVERRIDE
;
38 virtual bool IsScriptableURL(const GURL
& url
, std::string
* error
) const
42 ScriptingWhitelist scripting_whitelist_
;
44 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsClient
);
49 #endif // APPS_SHELL_SHELL_EXTENSIONS_CLIENT_H_