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

Unified Diff: extensions/browser/declarative_user_script_master.h

Issue 1056533002: Implement <webview>.addContentScript/removeContentScript API [2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@webview_addremove_contentscripts_2
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
Index: extensions/browser/declarative_user_script_master.h
diff --git a/extensions/browser/declarative_user_script_master.h b/extensions/browser/declarative_user_script_master.h
index f5730396099498c46c1ead26a1aed2670e975992..ebe199554caba68684c71490e667f1f8141bc367 100644
--- a/extensions/browser/declarative_user_script_master.h
+++ b/extensions/browser/declarative_user_script_master.h
@@ -6,7 +6,7 @@
#define EXTENSIONS_BROWSER_DECLARATIVE_USER_SCRIPT_MASTER_H_
#include "base/scoped_observer.h"
-#include "extensions/browser/extension_user_script_loader.h"
+#include "extensions/browser/user_script_loader.h"
namespace content {
class BrowserContext;
@@ -30,9 +30,13 @@ class DeclarativeUserScriptMaster {
// script load is in progress.
void AddScript(const UserScript& script);
- // Adds a set of scripts to shared memory region. This may not happen right
- // away if a script load is in progress.
- void AddScripts(const std::set<UserScript>& scripts);
+ // Adds a set of scripts to shared meomory region. The fetch of the content
+ // of the script on WebUI requires to start URL request to the associated
+ // render specified by |render_process_id, render_view_id|.
+ // This may not happen right away if a script load is in progress.
+ void AddScripts(const std::set<UserScript>& scripts,
+ int render_process_id,
+ int render_view_id);
// Removes script from shared memory region. This may not happen right away if
// a script load is in progress.
@@ -54,7 +58,7 @@ class DeclarativeUserScriptMaster {
// Script loader that handles loading contents of scripts into shared memory
// and notifying renderers of script updates.
- ExtensionUserScriptLoader loader_;
+ scoped_ptr<UserScriptLoader> loader_;
DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster);
};

Powered by Google App Engine
This is Rietveld 408576698