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

Side by Side Diff: chrome/renderer/extensions/dispatcher.h

Issue 10877004: Split a CHECK in 2 in MiscellaneousBindings::DispatchOnConnect to help (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 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 | « no previous file | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_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
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
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.
230 std::set<std::string> restricted_v8_extensions_;
231
232 // All declared function names. 225 // All declared function names.
233 std::set<std::string> function_names_; 226 std::set<std::string> function_names_;
234 227
235 // The extensions and apps that are active in this process. 228 // The extensions and apps that are active in this process.
236 std::set<std::string> active_extension_ids_; 229 std::set<std::string> active_extension_ids_;
237 230
238 // True once WebKit has been initialized (and it is therefore safe to poke). 231 // True once WebKit has been initialized (and it is therefore safe to poke).
239 bool is_webkit_initialized_; 232 bool is_webkit_initialized_;
240 233
241 // Status of webrequest usage for known extensions. 234 // Status of webrequest usage for known extensions.
(...skipping 13 matching lines...) Expand all
255 248
256 // Sends API requests to the extension host. 249 // Sends API requests to the extension host.
257 scoped_ptr<RequestSender> request_sender_; 250 scoped_ptr<RequestSender> request_sender_;
258 251
259 DISALLOW_COPY_AND_ASSIGN(Dispatcher); 252 DISALLOW_COPY_AND_ASSIGN(Dispatcher);
260 }; 253 };
261 254
262 } // namespace extensions 255 } // namespace extensions
263 256
264 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_ 257 #endif // CHROME_RENDERER_EXTENSIONS_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/extensions/dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698