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

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

Issue 959413003: Implement <webview>.addContentScript/removeContentScript API [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make the API work before the first navigation of guest. Created 5 years, 9 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 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 CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
7 7
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "extensions/browser/extension_system.h" 9 #include "extensions/browser/extension_system.h"
10 #include "extensions/common/one_shot_event.h" 10 #include "extensions/common/one_shot_event.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 DeclarativeUserScriptManager* declarative_user_script_manager() 42 DeclarativeUserScriptManager* declarative_user_script_manager()
43 override; // shared 43 override; // shared
44 StateStore* state_store() override; // shared 44 StateStore* state_store() override; // shared
45 StateStore* rules_store() override; // shared 45 StateStore* rules_store() override; // shared
46 LazyBackgroundTaskQueue* lazy_background_task_queue() override; // shared 46 LazyBackgroundTaskQueue* lazy_background_task_queue() override; // shared
47 InfoMap* info_map() override; // shared 47 InfoMap* info_map() override; // shared
48 EventRouter* event_router() override; // shared 48 EventRouter* event_router() override; // shared
49 ErrorConsole* error_console() override; 49 ErrorConsole* error_console() override;
50 InstallVerifier* install_verifier() override; 50 InstallVerifier* install_verifier() override;
51 QuotaService* quota_service() override; // shared 51 QuotaService* quota_service() override; // shared
52 WebViewContentScriptManager* web_view_content_script_manager()
53 override; // shared
52 54
53 void RegisterExtensionWithRequestContexts( 55 void RegisterExtensionWithRequestContexts(
54 const Extension* extension) override; 56 const Extension* extension) override;
55 57
56 void UnregisterExtensionWithRequestContexts( 58 void UnregisterExtensionWithRequestContexts(
57 const std::string& extension_id, 59 const std::string& extension_id,
58 const UnloadedExtensionInfo::Reason reason) override; 60 const UnloadedExtensionInfo::Reason reason) override;
59 61
60 const OneShotEvent& ready() const override; 62 const OneShotEvent& ready() const override;
61 ContentVerifier* content_verifier() override; // shared 63 ContentVerifier* content_verifier() override; // shared
(...skipping 25 matching lines...) Expand all
87 RuntimeData* runtime_data(); 89 RuntimeData* runtime_data();
88 ManagementPolicy* management_policy(); 90 ManagementPolicy* management_policy();
89 SharedUserScriptMaster* shared_user_script_master(); 91 SharedUserScriptMaster* shared_user_script_master();
90 DeclarativeUserScriptManager* declarative_user_script_manager(); 92 DeclarativeUserScriptManager* declarative_user_script_manager();
91 InfoMap* info_map(); 93 InfoMap* info_map();
92 LazyBackgroundTaskQueue* lazy_background_task_queue(); 94 LazyBackgroundTaskQueue* lazy_background_task_queue();
93 EventRouter* event_router(); 95 EventRouter* event_router();
94 ErrorConsole* error_console(); 96 ErrorConsole* error_console();
95 InstallVerifier* install_verifier(); 97 InstallVerifier* install_verifier();
96 QuotaService* quota_service(); 98 QuotaService* quota_service();
99 WebViewContentScriptManager* web_view_content_script_manager();
97 const OneShotEvent& ready() const { return ready_; } 100 const OneShotEvent& ready() const { return ready_; }
98 ContentVerifier* content_verifier(); 101 ContentVerifier* content_verifier();
99 102
100 private: 103 private:
101 Profile* profile_; 104 Profile* profile_;
102 105
103 // The services that are shared between normal and incognito profiles. 106 // The services that are shared between normal and incognito profiles.
104 107
105 scoped_ptr<StateStore> state_store_; 108 scoped_ptr<StateStore> state_store_;
106 scoped_ptr<StateStoreNotificationObserver> 109 scoped_ptr<StateStoreNotificationObserver>
(...skipping 12 matching lines...) Expand all
119 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_; 122 scoped_ptr<DeclarativeUserScriptManager> declarative_user_script_manager_;
120 scoped_ptr<RuntimeData> runtime_data_; 123 scoped_ptr<RuntimeData> runtime_data_;
121 // ExtensionService depends on StateStore, Blacklist and RuntimeData. 124 // ExtensionService depends on StateStore, Blacklist and RuntimeData.
122 scoped_ptr<ExtensionService> extension_service_; 125 scoped_ptr<ExtensionService> extension_service_;
123 scoped_ptr<ManagementPolicy> management_policy_; 126 scoped_ptr<ManagementPolicy> management_policy_;
124 // extension_info_map_ needs to outlive process_manager_. 127 // extension_info_map_ needs to outlive process_manager_.
125 scoped_refptr<InfoMap> extension_info_map_; 128 scoped_refptr<InfoMap> extension_info_map_;
126 scoped_ptr<ErrorConsole> error_console_; 129 scoped_ptr<ErrorConsole> error_console_;
127 scoped_ptr<InstallVerifier> install_verifier_; 130 scoped_ptr<InstallVerifier> install_verifier_;
128 scoped_ptr<QuotaService> quota_service_; 131 scoped_ptr<QuotaService> quota_service_;
132 scoped_ptr<WebViewContentScriptManager> web_view_content_script_manager_;
129 133
130 // For verifying the contents of extensions read from disk. 134 // For verifying the contents of extensions read from disk.
131 scoped_refptr<ContentVerifier> content_verifier_; 135 scoped_refptr<ContentVerifier> content_verifier_;
132 136
133 #if defined(OS_CHROMEOS) 137 #if defined(OS_CHROMEOS)
134 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider> 138 scoped_ptr<chromeos::DeviceLocalAccountManagementPolicyProvider>
135 device_local_account_management_policy_provider_; 139 device_local_account_management_policy_provider_;
136 #endif 140 #endif
137 141
138 OneShotEvent ready_; 142 OneShotEvent ready_;
139 }; 143 };
140 144
141 Profile* profile_; 145 Profile* profile_;
142 146
143 Shared* shared_; 147 Shared* shared_;
144 148
145 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl); 149 DISALLOW_COPY_AND_ASSIGN(ExtensionSystemImpl);
146 }; 150 };
147 151
148 } // namespace extensions 152 } // namespace extensions
149 153
150 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_ 154 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SYSTEM_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698