Chromium Code Reviews| Index: chrome/browser/extensions/declarative_user_script_master.cc |
| diff --git a/chrome/browser/extensions/declarative_user_script_master.cc b/chrome/browser/extensions/declarative_user_script_master.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..360d987f09c4e7f2763faaa5d23be6ec40b16959 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/declarative_user_script_master.cc |
| @@ -0,0 +1,40 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "chrome/browser/extensions/declarative_user_script_master.h" |
| + |
| +#include <set> |
| + |
| +#include "chrome/browser/profiles/profile.h" |
|
Devlin
2014/08/04 18:33:24
Do we need this?
Mark Dittmer
2014/08/05 20:33:18
s'pose not.
|
| + |
| +namespace extensions { |
| + |
| +DeclarativeUserScriptMaster::DeclarativeUserScriptMaster( |
| + Profile* profile, |
| + const ExtensionId& extension_id) |
| + : loader_(profile, |
| + extension_id, |
| + false /* listen_for_extension_system_loaded */) { |
| +} |
| + |
| +DeclarativeUserScriptMaster::~DeclarativeUserScriptMaster() { |
| +} |
| + |
| +void DeclarativeUserScriptMaster::AddScript(const UserScript& script) { |
| + std::set<UserScript> set; |
| + set.insert(script); |
| + loader_.AddScripts(set); |
| +} |
| + |
| +void DeclarativeUserScriptMaster::RemoveScript(const UserScript& script) { |
| + std::set<UserScript> set; |
| + set.insert(script); |
| + loader_.RemoveScripts(set); |
| +} |
| + |
| +void DeclarativeUserScriptMaster::ClearScripts() { |
| + loader_.ClearScripts(); |
| +} |
| + |
| +} // namespace extensions |