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
3 // found in the LICENSE file.
5 #include "extensions/browser/declarative_user_script_master.h"
9 #include "content/public/browser/browser_context.h"
11 namespace extensions
{
13 DeclarativeUserScriptMaster::DeclarativeUserScriptMaster(
14 content::BrowserContext
* browser_context
,
15 const HostID
& host_id
)
17 loader_(browser_context
,
19 false /* listen_for_extension_system_loaded */) {
22 DeclarativeUserScriptMaster::~DeclarativeUserScriptMaster() {
25 void DeclarativeUserScriptMaster::AddScript(const UserScript
& script
) {
26 std::set
<UserScript
> set
;
28 loader_
.AddScripts(set
);
31 void DeclarativeUserScriptMaster::RemoveScript(const UserScript
& script
) {
32 std::set
<UserScript
> set
;
34 loader_
.RemoveScripts(set
);
37 void DeclarativeUserScriptMaster::ClearScripts() {
38 loader_
.ClearScripts();
41 } // namespace extensions