Close crashed incognito-mode app's shell window.
[chromium-blink-merge.git] / apps / shell / shell_extensions_client.h
blob1ed3697bd8fd6ec3fa09bb4f5a64ebe9d8c240cb
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"
12 namespace apps {
14 // The app_shell implementation of ExtensionsClient.
15 class ShellExtensionsClient : public extensions::ExtensionsClient {
16 public:
17 ShellExtensionsClient();
18 virtual ~ShellExtensionsClient();
20 // extensions::ExtensionsClient overrides:
21 virtual void Initialize() OVERRIDE;
22 virtual const extensions::PermissionsProvider& GetPermissionsProvider() const
23 OVERRIDE;
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)
33 OVERRIDE;
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
39 OVERRIDE;
41 private:
42 ScriptingWhitelist scripting_whitelist_;
44 DISALLOW_COPY_AND_ASSIGN(ShellExtensionsClient);
47 } // namespace apps
49 #endif // APPS_SHELL_SHELL_EXTENSIONS_CLIENT_H_