Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: chrome/browser/extensions/declarative_user_script_manager.h

Issue 796453003: Introduce DeclarativeUserScriptManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move back to extensions namespace. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 <map>
9
10 #include "base/macros.h"
11 #include "base/memory/linked_ptr.h"
12
13 class Profile;
14
15 namespace extensions {
16 class DeclarativeUserScriptMaster;
17
18 // Manages a set of DeclarativeUserScriptMaster objects for script injections.
19 class DeclarativeUserScriptManager {
20 public:
21 explicit DeclarativeUserScriptManager(Profile* profile);
22 ~DeclarativeUserScriptManager();
23
24 // Get the user script master for declarative scripts; if one does not exist,
25 // a new object will be created.
26 DeclarativeUserScriptMaster* GetDeclarativeUserScriptMasterByID(
27 const std::string& id);
28
29 private:
30 using UserScriptMasterMap =
31 std::map<std::string, linked_ptr<DeclarativeUserScriptMaster>>;
Devlin 2014/12/12 20:36:10 I'm assuming this weird indentation is the work of
32
33 // A map of DeclarativeUserScriptMasters for ids; each master is lazily
34 // initialized.
35 UserScriptMasterMap declarative_user_script_masters_;
36
37 Profile* profile_;
38
39 DISALLOW_COPY_AND_ASSIGN(DeclarativeUserScriptManager);
40 };
41
42 } // extensions
43
44 #endif // CHROME_BROWSER_EXTENSIONS_DECLARATIVE_USER_SCRIPT_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698