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

Side by Side Diff: chrome/browser/extensions/test_extension_system.h

Issue 420543002: Declarative content scripts: Browser-side: per-extension shared memory regions (lazily loaded) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit and rebase from master Created 6 years, 4 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 6 #define CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
7 7
8 #include "extensions/browser/extension_system.h" 8 #include "extensions/browser/extension_system.h"
9 #include "extensions/common/one_shot_event.h" 9 #include "extensions/common/one_shot_event.h"
10 10
11 class Profile; 11 class Profile;
12 class TestingValueStore; 12 class TestingValueStore;
13 13
14 namespace base { 14 namespace base {
15 class CommandLine; 15 class CommandLine;
16 class FilePath; 16 class FilePath;
17 class Time; 17 class Time;
18 } 18 }
19 19
20 namespace content { 20 namespace content {
21 class BrowserContext; 21 class BrowserContext;
22 } 22 }
23 23
24 namespace extensions { 24 namespace extensions {
25 class DeclarativeUserScriptMaster;
25 class ExtensionPrefs; 26 class ExtensionPrefs;
26 class RuntimeData; 27 class RuntimeData;
28 class SharedUserScriptMaster;
27 class StandardManagementPolicyProvider; 29 class StandardManagementPolicyProvider;
28 30
29 // Test ExtensionSystem, for use with TestingProfile. 31 // Test ExtensionSystem, for use with TestingProfile.
30 class TestExtensionSystem : public ExtensionSystem { 32 class TestExtensionSystem : public ExtensionSystem {
31 public: 33 public:
32 explicit TestExtensionSystem(Profile* profile); 34 explicit TestExtensionSystem(Profile* profile);
33 virtual ~TestExtensionSystem(); 35 virtual ~TestExtensionSystem();
34 36
35 // KeyedService implementation. 37 // KeyedService implementation.
36 virtual void Shutdown() OVERRIDE; 38 virtual void Shutdown() OVERRIDE;
(...skipping 18 matching lines...) Expand all
55 // implementation. Takes ownership of |manager|. 57 // implementation. Takes ownership of |manager|.
56 void SetProcessManager(ProcessManager* manager); 58 void SetProcessManager(ProcessManager* manager);
57 59
58 void CreateSocketManager(); 60 void CreateSocketManager();
59 61
60 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {} 62 virtual void InitForRegularProfile(bool extensions_enabled) OVERRIDE {}
61 void SetExtensionService(ExtensionService* service); 63 void SetExtensionService(ExtensionService* service);
62 virtual ExtensionService* extension_service() OVERRIDE; 64 virtual ExtensionService* extension_service() OVERRIDE;
63 virtual RuntimeData* runtime_data() OVERRIDE; 65 virtual RuntimeData* runtime_data() OVERRIDE;
64 virtual ManagementPolicy* management_policy() OVERRIDE; 66 virtual ManagementPolicy* management_policy() OVERRIDE;
65 virtual UserScriptMaster* user_script_master() OVERRIDE; 67 virtual SharedUserScriptMaster* shared_user_script_master() OVERRIDE;
66 virtual ProcessManager* process_manager() OVERRIDE; 68 virtual ProcessManager* process_manager() OVERRIDE;
67 virtual StateStore* state_store() OVERRIDE; 69 virtual StateStore* state_store() OVERRIDE;
68 virtual StateStore* rules_store() OVERRIDE; 70 virtual StateStore* rules_store() OVERRIDE;
69 TestingValueStore* value_store() { return value_store_; } 71 TestingValueStore* value_store() { return value_store_; }
70 virtual InfoMap* info_map() OVERRIDE; 72 virtual InfoMap* info_map() OVERRIDE;
71 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() OVERRIDE; 73 virtual LazyBackgroundTaskQueue* lazy_background_task_queue() OVERRIDE;
72 void SetEventRouter(scoped_ptr<EventRouter> event_router); 74 void SetEventRouter(scoped_ptr<EventRouter> event_router);
73 virtual EventRouter* event_router() OVERRIDE; 75 virtual EventRouter* event_router() OVERRIDE;
74 virtual ExtensionWarningService* warning_service() OVERRIDE; 76 virtual ExtensionWarningService* warning_service() OVERRIDE;
75 virtual Blacklist* blacklist() OVERRIDE; 77 virtual Blacklist* blacklist() OVERRIDE;
76 virtual ErrorConsole* error_console() OVERRIDE; 78 virtual ErrorConsole* error_console() OVERRIDE;
77 virtual InstallVerifier* install_verifier() OVERRIDE; 79 virtual InstallVerifier* install_verifier() OVERRIDE;
78 virtual QuotaService* quota_service() OVERRIDE; 80 virtual QuotaService* quota_service() OVERRIDE;
79 virtual const OneShotEvent& ready() const OVERRIDE; 81 virtual const OneShotEvent& ready() const OVERRIDE;
80 virtual ContentVerifier* content_verifier() OVERRIDE; 82 virtual ContentVerifier* content_verifier() OVERRIDE;
81 virtual scoped_ptr<ExtensionSet> GetDependentExtensions( 83 virtual scoped_ptr<ExtensionSet> GetDependentExtensions(
82 const Extension* extension) OVERRIDE; 84 const Extension* extension) OVERRIDE;
85 virtual DeclarativeUserScriptMaster*
86 GetDeclarativeUserScriptMasterByExtension(
87 const ExtensionId& extension_id) OVERRIDE;
83 88
84 void SetReady() { 89 void SetReady() {
85 LOG(INFO) << "SetReady()"; 90 LOG(INFO) << "SetReady()";
86 ready_.Signal(); 91 ready_.Signal();
87 } 92 }
88 93
89 // Factory method for tests to use with SetTestingProfile. 94 // Factory method for tests to use with SetTestingProfile.
90 static KeyedService* Build(content::BrowserContext* profile); 95 static KeyedService* Build(content::BrowserContext* profile);
91 96
92 protected: 97 protected:
(...skipping 14 matching lines...) Expand all
107 scoped_ptr<EventRouter> event_router_; 112 scoped_ptr<EventRouter> event_router_;
108 scoped_ptr<ErrorConsole> error_console_; 113 scoped_ptr<ErrorConsole> error_console_;
109 scoped_ptr<InstallVerifier> install_verifier_; 114 scoped_ptr<InstallVerifier> install_verifier_;
110 scoped_ptr<QuotaService> quota_service_; 115 scoped_ptr<QuotaService> quota_service_;
111 OneShotEvent ready_; 116 OneShotEvent ready_;
112 }; 117 };
113 118
114 } // namespace extensions 119 } // namespace extensions
115 120
116 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_ 121 #endif // CHROME_BROWSER_EXTENSIONS_TEST_EXTENSION_SYSTEM_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/shared_user_script_master.cc ('k') | chrome/browser/extensions/test_extension_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698