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

Unified Diff: chrome/renderer/user_script_slave.h

Issue 1585013: Localize CSS files in content scripts (but don't localize JS files).... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/user_script_slave.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/user_script_slave.h
===================================================================
--- chrome/renderer/user_script_slave.h (revision 43656)
+++ chrome/renderer/user_script_slave.h (working copy)
@@ -17,6 +17,8 @@
#include "chrome/common/extensions/user_script.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
+class RenderThreadBase;
+
namespace WebKit {
class WebFrame;
}
@@ -26,13 +28,14 @@
// Manages installed UserScripts for a render process.
class UserScriptSlave {
public:
- UserScriptSlave();
+ explicit UserScriptSlave(RenderThreadBase* render_thread);
// Returns the unique set of extension IDs this UserScriptSlave knows about.
void GetActiveExtensions(std::set<std::string>* extension_ids);
// Update the parsed scripts from shared memory.
- bool UpdateScripts(base::SharedMemoryHandle shared_memory);
+ bool UpdateScripts(base::SharedMemoryHandle shared_memory,
+ bool is_incognito_process);
// Inject the appropriate scripts into a frame based on its URL.
// TODO(aa): Extract a UserScriptFrame interface out of this to improve
@@ -44,6 +47,8 @@
static void InsertInitExtensionCode(std::vector<WebScriptSource>* sources,
const std::string& extension_id);
private:
+ friend class UserScriptSlaveTest;
+
// Shared memory containing raw script data.
scoped_ptr<base::SharedMemory> shared_memory_;
@@ -51,6 +56,9 @@
std::vector<UserScript*> scripts_;
STLElementDeleter<std::vector<UserScript*> > script_deleter_;
+ // RPC message sender for fetching message catalogs.
+ RenderThreadBase* render_thread_;
+
// Greasemonkey API source that is injected with the scripts.
base::StringPiece api_js_;
« no previous file with comments | « chrome/renderer/render_thread.cc ('k') | chrome/renderer/user_script_slave.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698