OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |