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

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

Issue 2193093002: [UserScript cleanup] Remove use of ScopedVector from UserScriptSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1277 void Dispatcher::OnSetActivityLoggingEnabled(bool enabled) { 1277 void Dispatcher::OnSetActivityLoggingEnabled(bool enabled) {
1278 activity_logging_enabled_ = enabled; 1278 activity_logging_enabled_ = enabled;
1279 if (enabled) { 1279 if (enabled) {
1280 for (const std::string& id : active_extension_ids_) 1280 for (const std::string& id : active_extension_ids_)
1281 DOMActivityLogger::AttachToWorld(DOMActivityLogger::kMainWorldId, id); 1281 DOMActivityLogger::AttachToWorld(DOMActivityLogger::kMainWorldId, id);
1282 } 1282 }
1283 script_injection_manager_->set_activity_logging_enabled(enabled); 1283 script_injection_manager_->set_activity_logging_enabled(enabled);
1284 user_script_set_manager_->set_activity_logging_enabled(enabled); 1284 user_script_set_manager_->set_activity_logging_enabled(enabled);
1285 } 1285 }
1286 1286
1287 void Dispatcher::OnUserScriptsUpdated(const std::set<HostID>& changed_hosts, 1287 void Dispatcher::OnUserScriptsUpdated(const std::set<HostID>& changed_hosts) {
1288 const std::vector<UserScript*>& scripts) {
1289 UpdateActiveExtensions(); 1288 UpdateActiveExtensions();
1290 } 1289 }
1291 1290
1292 void Dispatcher::UpdateActiveExtensions() { 1291 void Dispatcher::UpdateActiveExtensions() {
1293 std::set<std::string> active_extensions = active_extension_ids_; 1292 std::set<std::string> active_extensions = active_extension_ids_;
1294 user_script_set_manager_->GetAllActiveExtensionIds(&active_extensions); 1293 user_script_set_manager_->GetAllActiveExtensionIds(&active_extensions);
1295 delegate_->OnActiveExtensionsUpdated(active_extensions); 1294 delegate_->OnActiveExtensionsUpdated(active_extensions);
1296 } 1295 }
1297 1296
1298 void Dispatcher::InitOriginPermissions(const Extension* extension) { 1297 void Dispatcher::InitOriginPermissions(const Extension* extension) {
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
1674 // The "guestViewDeny" module must always be loaded last. It registers 1673 // The "guestViewDeny" module must always be loaded last. It registers
1675 // error-providing custom elements for the GuestView types that are not 1674 // error-providing custom elements for the GuestView types that are not
1676 // available, and thus all of those types must have been checked and loaded 1675 // available, and thus all of those types must have been checked and loaded
1677 // (or not loaded) beforehand. 1676 // (or not loaded) beforehand.
1678 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { 1677 if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
1679 module_system->Require("guestViewDeny"); 1678 module_system->Require("guestViewDeny");
1680 } 1679 }
1681 } 1680 }
1682 1681
1683 } // namespace extensions 1682 } // 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