| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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(int render_process_id, int render_view_id) |
| 134 : render_process_id(render_process_id), |
| 135 render_view_id(render_view_id) {} |
| 133 ~RoutingInfo() {} | 136 ~RoutingInfo() {} |
| 134 | 137 |
| 135 int render_process_id; | 138 int render_process_id; |
| 136 int render_view_id; | 139 int render_view_id; |
| 137 }; | 140 }; |
| 138 | 141 |
| 139 // Type of a API consumer instance that user scripts will be injected on. | 142 // Type of a API consumer instance that user scripts will be injected on. |
| 140 enum ConsumerInstanceType { TAB, WEBVIEW }; | 143 enum ConsumerInstanceType { TAB, WEBVIEW }; |
| 141 | 144 |
| 142 // Constructor. Default the run location to document end, which is like | 145 // Constructor. Default the run location to document end, which is like |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 336 }; | 339 }; |
| 337 | 340 |
| 338 // For storing UserScripts with unique IDs in sets. | 341 // For storing UserScripts with unique IDs in sets. |
| 339 bool operator<(const UserScript& script1, const UserScript& script2); | 342 bool operator<(const UserScript& script1, const UserScript& script2); |
| 340 | 343 |
| 341 typedef std::vector<UserScript> UserScriptList; | 344 typedef std::vector<UserScript> UserScriptList; |
| 342 | 345 |
| 343 } // namespace extensions | 346 } // namespace extensions |
| 344 | 347 |
| 345 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ | 348 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ |
| OLD | NEW |