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

Side by Side Diff: extensions/test/test_extensions_client.h

Issue 234563003: extensions: Introduce a fake ExtensionsClient implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address yoz review Created 6 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 | Annotate | Revision Log
« no previous file with comments | « extensions/test/extensions_unittests_main.cc ('k') | extensions/test/test_extensions_client.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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.
4
5 #ifndef EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
6 #define EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
7
8 #include "base/macros.h"
9 #include "extensions/common/extensions_client.h"
10
11 namespace extensions {
12
13 class TestExtensionsClient : public ExtensionsClient {
14 public:
15 TestExtensionsClient();
16 virtual ~TestExtensionsClient();
17
18 private:
19 virtual void Initialize() OVERRIDE;
20 virtual const PermissionsProvider& GetPermissionsProvider() const OVERRIDE;
21 virtual const PermissionMessageProvider& GetPermissionMessageProvider() const
22 OVERRIDE;
23 virtual FeatureProvider* GetFeatureProviderByName(
24 const std::string& name) const OVERRIDE;
25 virtual void FilterHostPermissions(
26 const URLPatternSet& hosts,
27 URLPatternSet* new_hosts,
28 std::set<PermissionMessage>* messages) const OVERRIDE;
29 virtual void SetScriptingWhitelist(
30 const ScriptingWhitelist& whitelist) OVERRIDE;
31 virtual const ScriptingWhitelist& GetScriptingWhitelist() const OVERRIDE;
32 virtual URLPatternSet GetPermittedChromeSchemeHosts(
33 const Extension* extension,
34 const APIPermissionSet& api_permissions) const OVERRIDE;
35 virtual bool IsScriptableURL(const GURL& url,
36 std::string* error) const OVERRIDE;
37 virtual bool IsAPISchemaGenerated(const std::string& name) const OVERRIDE;
38 virtual base::StringPiece GetAPISchema(
39 const std::string& name) const OVERRIDE;
40 virtual void AddExtraFeatureFilters(SimpleFeature* feature) const OVERRIDE;
41 virtual bool ShouldSuppressFatalErrors() const OVERRIDE;
42
43 // A whitelist of extensions that can script anywhere. Do not add to this
44 // list (except in tests) without consulting the Extensions team first.
45 // Note: Component extensions have this right implicitly and do not need to be
46 // added to this list.
47 ScriptingWhitelist scripting_whitelist_;
48
49 DISALLOW_COPY_AND_ASSIGN(TestExtensionsClient);
50 };
51
52 } // namespace extensions
53
54 #endif // EXTENSIONS_TEST_TEST_EXTENSIONS_CLIENT_H_
OLDNEW
« no previous file with comments | « extensions/test/extensions_unittests_main.cc ('k') | extensions/test/test_extensions_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698