Chromium Code Reviews| Index: chrome/browser/extensions/declarative_user_script_master.h |
| diff --git a/chrome/browser/extensions/declarative_user_script_master.h b/chrome/browser/extensions/declarative_user_script_master.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8ee085581074e249aa442279563c0f9bc758c819 |
| --- /dev/null |
| +++ b/chrome/browser/extensions/declarative_user_script_master.h |
| @@ -0,0 +1,44 @@ |
| +// 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. |
| + |
| +#ifndef CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| +#define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |
| + |
| +#include "chrome/browser/extensions/user_script_loader.h" |
| +#include "extensions/common/extension.h" |
| +#include "extensions/common/user_script.h" |
|
Devlin
2014/08/04 18:33:24
Can just forward-declare UserScript here.
Mark Dittmer
2014/08/05 20:33:18
Done.
|
| + |
| +class Profile; |
| + |
| +namespace extensions { |
| + |
| +class DeclarativeUserScriptMaster { |
|
Devlin
2014/08/04 18:33:24
class comments
Mark Dittmer
2014/08/05 20:33:18
Done.
|
| + public: |
| + DeclarativeUserScriptMaster(Profile* profile, |
| + const ExtensionId& extension_id); |
| + virtual ~DeclarativeUserScriptMaster(); |
| + |
| + // Adds script to shared memory region. This may not happen right away if a |
| + // script load is in progress. |
| + void AddScript(const UserScript& script); |
| + |
| + // Removes script from shared memory region. This may not happen right away if |
| + // a script load is in progress. |
| + void RemoveScript(const UserScript& script); |
| + |
| + // Removes all scripts from shared memory region. This may not happen right |
| + // away if a script load is in progress. |
| + void ClearScripts(); |
| + |
| + private: |
| + // Script loader that handles loading contents of scripts into shared memory |
| + // and notifying renderers of scripts in shared memory. |
| + UserScriptLoader loader_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptMaster); |
| +}; |
| + |
| +} // namespace extensions |
| + |
| +#endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MASTER_H_ |