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

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

Issue 234413005: Move most of ChromeV8Context to a base ScriptContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: factor feature_channel out of module_system 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
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_USER_SCRIPT_SLAVE_H_ 5 #ifndef CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
6 #define CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ 6 #define CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 14 matching lines...) Expand all
25 25
26 using blink::WebScriptSource; 26 using blink::WebScriptSource;
27 27
28 namespace extensions { 28 namespace extensions {
29 class Extension; 29 class Extension;
30 class ExtensionSet; 30 class ExtensionSet;
31 31
32 // Manages installed UserScripts for a render process. 32 // Manages installed UserScripts for a render process.
33 class UserScriptSlave { 33 class UserScriptSlave {
34 public: 34 public:
35 // Utility to get the URL we will match against for a frame. If the frame has
36 // committed, this is the commited URL. Otherwise it is the provisional URL.
37 static GURL GetDataSourceURLForFrame(const blink::WebFrame* frame);
38
39 explicit UserScriptSlave(const ExtensionSet* extensions); 35 explicit UserScriptSlave(const ExtensionSet* extensions);
40 ~UserScriptSlave(); 36 ~UserScriptSlave();
41 37
42 // Returns the unique set of extension IDs this UserScriptSlave knows about. 38 // Returns the unique set of extension IDs this UserScriptSlave knows about.
43 void GetActiveExtensions(std::set<std::string>* extension_ids); 39 void GetActiveExtensions(std::set<std::string>* extension_ids);
44 40
45 // Update the parsed scripts from shared memory. 41 // Update the parsed scripts from shared memory.
46 bool UpdateScripts(base::SharedMemoryHandle shared_memory); 42 bool UpdateScripts(base::SharedMemoryHandle shared_memory);
47 43
48 // Inject the appropriate scripts into a frame based on its URL. 44 // Inject the appropriate scripts into a frame based on its URL.
(...skipping 30 matching lines...) Expand all
79 75
80 typedef std::map<std::string, int> IsolatedWorldMap; 76 typedef std::map<std::string, int> IsolatedWorldMap;
81 IsolatedWorldMap isolated_world_ids_; 77 IsolatedWorldMap isolated_world_ids_;
82 78
83 DISALLOW_COPY_AND_ASSIGN(UserScriptSlave); 79 DISALLOW_COPY_AND_ASSIGN(UserScriptSlave);
84 }; 80 };
85 81
86 } // namespace extensions 82 } // namespace extensions
87 83
88 #endif // CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SLAVE_H_ 84 #endif // CHROME_RENDERER_EXTENSIONS_USER_SCRIPT_SLAVE_H_
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/user_script_scheduler.cc ('k') | chrome/renderer/extensions/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698