OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_vector.h" |
| 10 #include "extensions/common/extension.h" |
| 11 |
| 12 class Profile; |
| 13 |
| 14 namespace extensions { |
| 15 |
| 16 class DeclarativeUserScriptMaster; |
| 17 |
| 18 class DeclarativeUserScriptManager { |
| 19 public: |
| 20 explicit DeclarativeUserScriptManager(Profile* profile); |
| 21 ~DeclarativeUserScriptManager(); |
| 22 |
| 23 // Get the user script master for declarative scripts, if any. |
| 24 DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByID( |
| 25 const ExtensionId& extension_id); |
| 26 private: |
| 27 Profile* profile_; |
| 28 |
| 29 // Shared memory region manager for programmatically declared scripts. |
| 30 // Managers are instantiated the first time the declarative |
| 31 // API is used by an extension to request content scripts. |
| 32 ScopedVector<DeclarativeUserScriptMaster> declarative_user_script_masters_; |
| 33 |
| 34 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptManager); |
| 35 }; |
| 36 |
| 37 } // extensions |
| 38 |
| 39 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_ |
OLD | NEW |