| 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/browser/declarative_user_script_master.h" | 5 #include "extensions/browser/declarative_user_script_master.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "content/public/browser/browser_context.h" | 9 #include "content/public/browser/browser_context.h" |
| 10 #include "extensions/browser/extension_user_script_loader.h" | 10 #include "extensions/browser/extension_user_script_loader.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 void DeclarativeUserScriptMaster::AddScript(const UserScript& script) { | 34 void DeclarativeUserScriptMaster::AddScript(const UserScript& script) { |
| 35 std::set<UserScript> set; | 35 std::set<UserScript> set; |
| 36 set.insert(script); | 36 set.insert(script); |
| 37 loader_->AddScripts(set); | 37 loader_->AddScripts(set); |
| 38 } | 38 } |
| 39 | 39 |
| 40 void DeclarativeUserScriptMaster::AddScripts( | 40 void DeclarativeUserScriptMaster::AddScripts( |
| 41 const std::set<UserScript>& scripts, | 41 const std::set<UserScript>& scripts, |
| 42 int render_process_id, | 42 int render_process_id, |
| 43 int render_view_id) { | 43 int render_view_id, |
| 44 loader_->AddScripts(scripts, render_process_id, render_view_id); | 44 bool is_incognito) { |
| 45 loader_->AddScripts(scripts, render_process_id, render_view_id, is_incognito); |
| 45 } | 46 } |
| 46 | 47 |
| 47 void DeclarativeUserScriptMaster::RemoveScript(const UserScript& script) { | 48 void DeclarativeUserScriptMaster::RemoveScript(const UserScript& script) { |
| 48 std::set<UserScript> set; | 49 std::set<UserScript> set; |
| 49 set.insert(script); | 50 set.insert(script); |
| 50 loader_->RemoveScripts(set); | 51 loader_->RemoveScripts(set); |
| 51 } | 52 } |
| 52 | 53 |
| 53 void DeclarativeUserScriptMaster::RemoveScripts( | 54 void DeclarativeUserScriptMaster::RemoveScripts( |
| 54 const std::set<UserScript>& scripts) { | 55 const std::set<UserScript>& scripts) { |
| 55 loader_->RemoveScripts(scripts); | 56 loader_->RemoveScripts(scripts); |
| 56 } | 57 } |
| 57 | 58 |
| 58 void DeclarativeUserScriptMaster::ClearScripts() { | 59 void DeclarativeUserScriptMaster::ClearScripts() { |
| 59 loader_->ClearScripts(); | 60 loader_->ClearScripts(); |
| 60 } | 61 } |
| 61 | 62 |
| 62 } // namespace extensions | 63 } // namespace extensions |
| OLD | NEW |