OLD | NEW |
---|---|
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
84 typedef std::map<HostID, linked_ptr<UserScriptSet> > UserScriptSetMap; | 84 typedef std::map<HostID, linked_ptr<UserScriptSet> > UserScriptSetMap; |
85 | 85 |
86 // content::RenderProcessObserver implementation. | 86 // content::RenderProcessObserver implementation. |
87 bool OnControlMessageReceived(const IPC::Message& message) override; | 87 bool OnControlMessageReceived(const IPC::Message& message) override; |
88 | 88 |
89 UserScriptSet* GetProgrammaticScriptsByHostID(const HostID& host_id); | 89 UserScriptSet* GetProgrammaticScriptsByHostID(const HostID& host_id); |
90 | 90 |
91 // Handle the UpdateUserScripts extension message. | 91 // Handle the UpdateUserScripts extension message. |
92 void OnUpdateUserScripts(base::SharedMemoryHandle shared_memory, | 92 void OnUpdateUserScripts(base::SharedMemoryHandle shared_memory, |
93 const HostID& host_id, | 93 const HostID& host_id, |
94 const std::set<HostID>& changed_hosts); | 94 const std::set<HostID>& changed_hosts, |
95 bool is_to_guest_render_process); | |
95 | 96 |
96 // Scripts statically defined in extension manifests. | 97 // Scripts statically defined in extension manifests. |
97 UserScriptSet static_scripts_; | 98 UserScriptSet static_scripts_; |
98 | 99 |
99 // Scripts programmatically-defined through API calls (initialized and stored | 100 // Scripts programmatically-defined through API calls (initialized and stored |
100 // per-extension). | 101 // per-extension). |
101 UserScriptSetMap programmatic_scripts_; | 102 UserScriptSetMap programmatic_scripts_; |
102 | 103 |
104 // Indicates whether the manager object belongs to a guest render process. | |
105 bool is_in_guest_render_process_; | |
Fady Samuel
2015/04/02 21:46:09
is_guest_process_ is less wordy.
| |
106 | |
103 // The set of all known extensions. Owned by the Dispatcher. | 107 // The set of all known extensions. Owned by the Dispatcher. |
104 const ExtensionSet* extensions_; | 108 const ExtensionSet* extensions_; |
105 | 109 |
106 // The associated observers. | 110 // The associated observers. |
107 ObserverList<Observer> observers_; | 111 ObserverList<Observer> observers_; |
108 | 112 |
109 DISALLOW_COPY_AND_ASSIGN(UserScriptSetManager); | 113 DISALLOW_COPY_AND_ASSIGN(UserScriptSetManager); |
110 }; | 114 }; |
111 | 115 |
112 } // namespace extensions | 116 } // namespace extensions |
113 | 117 |
114 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_ | 118 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_MANAGER_H_ |
OLD | NEW |