OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_COMMON_USER_SCRIPT_H_ | 5 #ifndef EXTENSIONS_COMMON_USER_SCRIPT_H_ |
6 #define EXTENSIONS_COMMON_USER_SCRIPT_H_ | 6 #define EXTENSIONS_COMMON_USER_SCRIPT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 // Set when the content is loaded by LoadContent | 123 // Set when the content is loaded by LoadContent |
124 std::string content_; | 124 std::string content_; |
125 }; | 125 }; |
126 | 126 |
127 typedef std::vector<File> FileList; | 127 typedef std::vector<File> FileList; |
128 | 128 |
129 // Render's routing info of a <webview> that the user script will be injected | 129 // Render's routing info of a <webview> that the user script will be injected |
130 // on. Only user scripts from <webview>s have a custom routing info. | 130 // on. Only user scripts from <webview>s have a custom routing info. |
131 struct RoutingInfo { | 131 struct RoutingInfo { |
132 RoutingInfo() : render_process_id(-1), render_view_id(-1) {}; | 132 RoutingInfo() : render_process_id(-1), render_view_id(-1) {} |
133 ~RoutingInfo() {}; | 133 ~RoutingInfo() {} |
134 | 134 |
135 int render_process_id; | 135 int render_process_id; |
136 int render_view_id; | 136 int render_view_id; |
137 }; | 137 }; |
138 | 138 |
139 // Type of a API consumer instance that user scripts will be injected on. | 139 // Type of a API consumer instance that user scripts will be injected on. |
140 enum ConsumerInstanceType { TAB, WEBVIEW }; | 140 enum ConsumerInstanceType { TAB, WEBVIEW }; |
141 | 141 |
142 // Constructor. Default the run location to document end, which is like | 142 // Constructor. Default the run location to document end, which is like |
143 // Greasemonkey and probably more useful for typical scripts. | 143 // Greasemonkey and probably more useful for typical scripts. |
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 }; | 336 }; |
337 | 337 |
338 // For storing UserScripts with unique IDs in sets. | 338 // For storing UserScripts with unique IDs in sets. |
339 bool operator<(const UserScript& script1, const UserScript& script2); | 339 bool operator<(const UserScript& script1, const UserScript& script2); |
340 | 340 |
341 typedef std::vector<UserScript> UserScriptList; | 341 typedef std::vector<UserScript> UserScriptList; |
342 | 342 |
343 } // namespace extensions | 343 } // namespace extensions |
344 | 344 |
345 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ | 345 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ |
OLD | NEW |