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

Side by Side Diff: extensions/renderer/user_script_set_manager.h

Issue 2193093002: [UserScript cleanup] Remove use of ScopedVector from UserScriptSet. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months 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
« no previous file with comments | « extensions/renderer/user_script_set.cc ('k') | extensions/renderer/user_script_set_manager.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_ 5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_
6 #define EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_ 6 #define EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 // only programmatically-declared scripts, instantiated 39 // only programmatically-declared scripts, instantiated
40 // when an extension first creates a declarative rule 40 // when an extension first creates a declarative rule
41 // that would, if triggered, request a script injection. 41 // that would, if triggered, request a script injection.
42 class UserScriptSetManager : public content::RenderThreadObserver { 42 class UserScriptSetManager : public content::RenderThreadObserver {
43 public: 43 public:
44 // Like a UserScriptSet::Observer, but automatically subscribes to all sets 44 // Like a UserScriptSet::Observer, but automatically subscribes to all sets
45 // associated with the manager. 45 // associated with the manager.
46 class Observer { 46 class Observer {
47 public: 47 public:
48 virtual void OnUserScriptsUpdated( 48 virtual void OnUserScriptsUpdated(
49 const std::set<HostID>& changed_hosts, 49 const std::set<HostID>& changed_hosts) = 0;
50 const std::vector<UserScript*>& scripts) = 0;
51 }; 50 };
52 51
53 UserScriptSetManager(); 52 UserScriptSetManager();
54 53
55 ~UserScriptSetManager() override; 54 ~UserScriptSetManager() override;
56 55
57 void AddObserver(Observer* observer); 56 void AddObserver(Observer* observer);
58 void RemoveObserver(Observer* observer); 57 void RemoveObserver(Observer* observer);
59 58
60 // Looks up the script injection associated with |script_id| and 59 // Looks up the script injection associated with |script_id| and
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 // The associated observers. 112 // The associated observers.
114 base::ObserverList<Observer> observers_; 113 base::ObserverList<Observer> observers_;
115 114
116 DISALLOW_COPY_AND_ASSIGN(UserScriptSetManager); 115 DISALLOW_COPY_AND_ASSIGN(UserScriptSetManager);
117 }; 116 };
118 117
119 } // namespace extensions 118 } // namespace extensions
120 119
121 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_ 120 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_
OLDNEW
« no previous file with comments | « extensions/renderer/user_script_set.cc ('k') | extensions/renderer/user_script_set_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698