Chromium Code Reviews| OLD | NEW |
|---|---|
| 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_RENDERER_EXTENSIONS_DISPATCHER_H_ | 5 #ifndef CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 6 #define CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 167 bool adblock, | 167 bool adblock, |
| 168 bool adblock_plus, | 168 bool adblock_plus, |
| 169 bool other_webrequest); | 169 bool other_webrequest); |
| 170 void OnShouldUnload(const std::string& extension_id, int sequence_id); | 170 void OnShouldUnload(const std::string& extension_id, int sequence_id); |
| 171 void OnUnload(const std::string& extension_id); | 171 void OnUnload(const std::string& extension_id); |
| 172 void OnCancelUnload(const std::string& extension_id); | 172 void OnCancelUnload(const std::string& extension_id); |
| 173 | 173 |
| 174 // Update the list of active extensions that will be reported when we crash. | 174 // Update the list of active extensions that will be reported when we crash. |
| 175 void UpdateActiveExtensions(); | 175 void UpdateActiveExtensions(); |
| 176 | 176 |
| 177 // Calls RenderThread's RegisterExtension and keeps tracks of which v8 | |
| 178 // extension is for Chrome Extensions only. | |
| 179 void RegisterExtension(v8::Extension* extension, bool restrict_to_extensions); | |
| 180 | |
| 181 // Sets up the host permissions for |extension|. | 177 // Sets up the host permissions for |extension|. |
| 182 void InitOriginPermissions(const Extension* extension); | 178 void InitOriginPermissions(const Extension* extension); |
| 183 void AddOrRemoveOriginPermissions( | 179 void AddOrRemoveOriginPermissions( |
| 184 UpdatedExtensionPermissionsInfo::Reason reason, | 180 UpdatedExtensionPermissionsInfo::Reason reason, |
| 185 const Extension* extension, | 181 const Extension* extension, |
| 186 const URLPatternSet& origins); | 182 const URLPatternSet& origins); |
| 187 | 183 |
| 188 void RegisterNativeHandlers(ModuleSystem* module_system, | 184 void RegisterNativeHandlers(ModuleSystem* module_system, |
| 189 ChromeV8Context* context); | 185 ChromeV8Context* context); |
| 190 | 186 |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 219 // All the bindings contexts that are currently loaded for this renderer. | 215 // All the bindings contexts that are currently loaded for this renderer. |
| 220 // There is zero or one for each v8 context. | 216 // There is zero or one for each v8 context. |
| 221 ChromeV8ContextSet v8_context_set_; | 217 ChromeV8ContextSet v8_context_set_; |
| 222 | 218 |
| 223 scoped_ptr<UserScriptSlave> user_script_slave_; | 219 scoped_ptr<UserScriptSlave> user_script_slave_; |
| 224 | 220 |
| 225 // Same as above, but on a longer timer and will run even if the process is | 221 // Same as above, but on a longer timer and will run even if the process is |
| 226 // not idle, to ensure that IdleHandle gets called eventually. | 222 // not idle, to ensure that IdleHandle gets called eventually. |
| 227 base::RepeatingTimer<content::RenderThread> forced_idle_timer_; | 223 base::RepeatingTimer<content::RenderThread> forced_idle_timer_; |
| 228 | 224 |
| 229 // The v8 extensions which are restricted to extension-related contexts. | 225 // The v8 extensions which are restricted to extension-related contexts. |
|
Mihai Parparita -not on Chrome
2012/08/22 23:36:32
I think you can remove this too.
Matt Perry
2012/08/23 00:22:25
Done.
| |
| 230 std::set<std::string> restricted_v8_extensions_; | 226 std::set<std::string> restricted_v8_extensions_; |
| 231 | 227 |
| 232 // All declared function names. | 228 // All declared function names. |
| 233 std::set<std::string> function_names_; | 229 std::set<std::string> function_names_; |
| 234 | 230 |
| 235 // The extensions and apps that are active in this process. | 231 // The extensions and apps that are active in this process. |
| 236 std::set<std::string> active_extension_ids_; | 232 std::set<std::string> active_extension_ids_; |
| 237 | 233 |
| 238 // True once WebKit has been initialized (and it is therefore safe to poke). | 234 // True once WebKit has been initialized (and it is therefore safe to poke). |
| 239 bool is_webkit_initialized_; | 235 bool is_webkit_initialized_; |
| (...skipping 15 matching lines...) Expand all Loading... | |
| 255 | 251 |
| 256 // Sends API requests to the extension host. | 252 // Sends API requests to the extension host. |
| 257 scoped_ptr<RequestSender> request_sender_; | 253 scoped_ptr<RequestSender> request_sender_; |
| 258 | 254 |
| 259 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 255 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 260 }; | 256 }; |
| 261 | 257 |
| 262 } // namespace extensions | 258 } // namespace extensions |
| 263 | 259 |
| 264 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ | 260 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ |
| OLD | NEW |