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

Side by Side Diff: extensions/renderer/dispatcher.cc

Issue 988633003: Refactoring: de-couple Extensions from "script injection System" [render side]:4 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 5 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 unified diff | Download patch
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/script_injection_manager.h » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 #include "extensions/renderer/dispatcher.h" 5 #include "extensions/renderer/dispatcher.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/alias.h" 10 #include "base/debug/alias.h"
(...skipping 1133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1144 extension->permissions_data()->GetEffectiveHostPermissions()); 1144 extension->permissions_data()->GetEffectiveHostPermissions());
1145 } 1145 }
1146 } 1146 }
1147 } 1147 }
1148 } 1148 }
1149 1149
1150 void Dispatcher::OnUsingWebRequestAPI(bool webrequest_used) { 1150 void Dispatcher::OnUsingWebRequestAPI(bool webrequest_used) {
1151 webrequest_used_ = webrequest_used; 1151 webrequest_used_ = webrequest_used;
1152 } 1152 }
1153 1153
1154 void Dispatcher::OnUserScriptsUpdated( 1154 void Dispatcher::OnUserScriptsUpdated(const std::set<HostID>& changed_hosts,
1155 const std::set<std::string>& changed_extensions, 1155 const std::vector<UserScript*>& scripts) {
1156 const std::vector<UserScript*>& scripts) {
1157 UpdateActiveExtensions(); 1156 UpdateActiveExtensions();
1158 } 1157 }
1159 1158
1160 void Dispatcher::UpdateActiveExtensions() { 1159 void Dispatcher::UpdateActiveExtensions() {
1161 std::set<std::string> active_extensions = active_extension_ids_; 1160 std::set<std::string> active_extensions = active_extension_ids_;
1162 user_script_set_manager_->GetAllActiveExtensionIds(&active_extensions); 1161 user_script_set_manager_->GetAllActiveExtensionIds(&active_extensions);
1163 delegate_->OnActiveExtensionsUpdated(active_extensions); 1162 delegate_->OnActiveExtensionsUpdated(active_extensions);
1164 } 1163 }
1165 1164
1166 void Dispatcher::InitOriginPermissions(const Extension* extension) { 1165 void Dispatcher::InitOriginPermissions(const Extension* extension) {
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
1553 return v8::Handle<v8::Object>(); 1552 return v8::Handle<v8::Object>();
1554 1553
1555 if (bind_name) 1554 if (bind_name)
1556 *bind_name = split.back(); 1555 *bind_name = split.back();
1557 1556
1558 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context)) 1557 return bind_object.IsEmpty() ? AsObjectOrEmpty(GetOrCreateChrome(context))
1559 : bind_object; 1558 : bind_object;
1560 } 1559 }
1561 1560
1562 } // namespace extensions 1561 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/renderer/dispatcher.h ('k') | extensions/renderer/script_injection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698