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

Unified Diff: extensions/renderer/dispatcher.cc

Issue 594653003: Move web_request_internal_custom_bindings.js and web_request_custom_bindings.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove HandleWebRequestAPIUsage from dispatcher_delegate. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/dispatcher_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/dispatcher.cc
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
index 80ee4ecd45f98ea75a24e203a254afdee5039167..913146ce30cd5a237c58b390dacd3e37ece8863f 100644
--- a/extensions/renderer/dispatcher.cc
+++ b/extensions/renderer/dispatcher.cc
@@ -185,7 +185,8 @@ Dispatcher::Dispatcher(DispatcherDelegate* delegate)
source_map_(&ResourceBundle::GetSharedInstance()),
v8_schema_registry_(new V8SchemaRegistry),
is_webkit_initialized_(false),
- user_script_set_manager_observer_(this) {
+ user_script_set_manager_observer_(this),
+ webrequest_used_(false) {
const CommandLine& command_line = *(CommandLine::ForCurrentProcess());
is_extension_process_ =
command_line.HasSwitch(extensions::switches::kExtensionProcess) ||
@@ -531,6 +532,11 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() {
IDR_UNCAUGHT_EXCEPTION_HANDLER_JS));
resources.push_back(std::make_pair("unload_event", IDR_UNLOAD_EVENT_JS));
resources.push_back(std::make_pair("utils", IDR_UTILS_JS));
+ resources.push_back(std::make_pair("webRequest",
+ IDR_WEB_REQUEST_CUSTOM_BINDINGS_JS));
+ resources.push_back(
+ std::make_pair("webRequestInternal",
+ IDR_WEB_REQUEST_INTERNAL_CUSTOM_BINDINGS_JS));
// Note: webView not webview so that this doesn't interfere with the
// chrome.webview API bindings.
resources.push_back(std::make_pair("webView", IDR_WEB_VIEW_JS));
@@ -982,7 +988,7 @@ void Dispatcher::OnUpdateTabSpecificPermissions(
}
void Dispatcher::OnUsingWebRequestAPI(bool webrequest_used) {
- delegate_->HandleWebRequestAPIUsage(webrequest_used);
+ webrequest_used_ = webrequest_used;
}
void Dispatcher::OnUserScriptsUpdated(
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/dispatcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698