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_H_ | 5 #ifndef EXTENSIONS_RENDERER_USER_SCRIPT_SET_H_ |
6 #define EXTENSIONS_RENDERER_USER_SCRIPT_SET_H_ | 6 #define EXTENSIONS_RENDERER_USER_SCRIPT_SET_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 scoped_ptr<ScriptInjection> GetDeclarativeScriptInjection( | 61 scoped_ptr<ScriptInjection> GetDeclarativeScriptInjection( |
62 int script_id, | 62 int script_id, |
63 blink::WebFrame* web_frame, | 63 blink::WebFrame* web_frame, |
64 int tab_id, | 64 int tab_id, |
65 UserScript::RunLocation run_location, | 65 UserScript::RunLocation run_location, |
66 const GURL& document_url); | 66 const GURL& document_url); |
67 | 67 |
68 // Updates scripts given the shared memory region containing user scripts. | 68 // Updates scripts given the shared memory region containing user scripts. |
69 // Returns true if the scripts were successfully updated. | 69 // Returns true if the scripts were successfully updated. |
70 bool UpdateUserScripts(base::SharedMemoryHandle shared_memory, | 70 bool UpdateUserScripts(base::SharedMemoryHandle shared_memory, |
71 const std::set<HostID>& changed_hosts); | 71 const std::set<HostID>& changed_hosts, |
| 72 bool whitelisted_only); |
72 | 73 |
73 const std::vector<UserScript*>& scripts() const { return scripts_.get(); } | 74 const std::vector<UserScript*>& scripts() const { return scripts_.get(); } |
74 | 75 |
75 private: | 76 private: |
76 // Returns a new ScriptInjection for the given |script| to execute in the | 77 // Returns a new ScriptInjection for the given |script| to execute in the |
77 // |web_frame|, or NULL if the script should not execute. | 78 // |web_frame|, or NULL if the script should not execute. |
78 scoped_ptr<ScriptInjection> GetInjectionForScript( | 79 scoped_ptr<ScriptInjection> GetInjectionForScript( |
79 UserScript* script, | 80 UserScript* script, |
80 blink::WebFrame* web_frame, | 81 blink::WebFrame* web_frame, |
81 int tab_id, | 82 int tab_id, |
(...skipping 12 matching lines...) Expand all Loading... |
94 | 95 |
95 // The associated observers. | 96 // The associated observers. |
96 ObserverList<Observer> observers_; | 97 ObserverList<Observer> observers_; |
97 | 98 |
98 DISALLOW_COPY_AND_ASSIGN(UserScriptSet); | 99 DISALLOW_COPY_AND_ASSIGN(UserScriptSet); |
99 }; | 100 }; |
100 | 101 |
101 } // namespace extensions | 102 } // namespace extensions |
102 | 103 |
103 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_H_ | 104 #endif // EXTENSIONS_RENDERER_USER_SCRIPT_SET_H_ |
OLD | NEW |