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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 DOCUMENT_START, // After the documentElement is created, but before | 59 DOCUMENT_START, // After the documentElement is created, but before |
60 // anything else happens. | 60 // anything else happens. |
61 DOCUMENT_END, // After the entire document is parsed. Same as | 61 DOCUMENT_END, // After the entire document is parsed. Same as |
62 // DOMContentLoaded. | 62 // DOMContentLoaded. |
63 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document | 63 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document |
64 // is "idle". Currently this uses the simple heuristic of: | 64 // is "idle". Currently this uses the simple heuristic of: |
65 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no | 65 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no |
66 // particular injection point is guaranteed. | 66 // particular injection point is guaranteed. |
67 RUN_DEFERRED, // The user script's injection was deferred for permissions | 67 RUN_DEFERRED, // The user script's injection was deferred for permissions |
68 // reasons, and was executed at a later time. | 68 // reasons, and was executed at a later time. |
| 69 BROWSER_DRIVEN, // The user script will be injected when triggered by an |
| 70 // IPC in the browser process. |
69 RUN_LOCATION_LAST // Leave this as the last item. | 71 RUN_LOCATION_LAST // Leave this as the last item. |
70 }; | 72 }; |
71 | 73 |
72 // Holds actual script file info. | 74 // Holds actual script file info. |
73 class File { | 75 class File { |
74 public: | 76 public: |
75 File(const base::FilePath& extension_root, | 77 File(const base::FilePath& extension_root, |
76 const base::FilePath& relative_path, | 78 const base::FilePath& relative_path, |
77 const GURL& url); | 79 const GURL& url); |
78 File(); | 80 File(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 }; | 292 }; |
291 | 293 |
292 // For storing UserScripts with unique IDs in sets. | 294 // For storing UserScripts with unique IDs in sets. |
293 bool operator<(const UserScript& script1, const UserScript& script2); | 295 bool operator<(const UserScript& script1, const UserScript& script2); |
294 | 296 |
295 typedef std::vector<UserScript> UserScriptList; | 297 typedef std::vector<UserScript> UserScriptList; |
296 | 298 |
297 } // namespace extensions | 299 } // namespace extensions |
298 | 300 |
299 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ | 301 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ |
OLD | NEW |