Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Side by Side Diff: chrome/common/extensions/user_script.h

Issue 9456037: Adding run_at to chrome.tabs.executeScript/insertCss. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 6 #define CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 28 matching lines...) Expand all
39 // Locations that user scripts can be run inside the document. 39 // Locations that user scripts can be run inside the document.
40 enum RunLocation { 40 enum RunLocation {
41 DOCUMENT_START, // After the documentElemnet is created, but before 41 DOCUMENT_START, // After the documentElemnet is created, but before
42 // anything else happens. 42 // anything else happens.
43 DOCUMENT_END, // After the entire document is parsed. Same as 43 DOCUMENT_END, // After the entire document is parsed. Same as
44 // DOMContentLoaded. 44 // DOMContentLoaded.
45 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document 45 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document
46 // is "idle". Currently this uses the simple heuristic of: 46 // is "idle". Currently this uses the simple heuristic of:
47 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no 47 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no
48 // particular injection point is guaranteed. 48 // particular injection point is guaranteed.
49 DOCUMENT_NOW, // As soon as possible.
49 50
50 RUN_LOCATION_LAST // Leave this as the last item. 51 RUN_LOCATION_LAST // Leave this as the last item.
51 }; 52 };
52 53
53 // Holds actual script file info. 54 // Holds actual script file info.
54 class File { 55 class File {
55 public: 56 public:
56 File(const FilePath& extension_root, const FilePath& relative_path, 57 File(const FilePath& extension_root, const FilePath& relative_path,
57 const GURL& url); 58 const GURL& url);
58 File(); 59 File();
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 // Defaults to false. 251 // Defaults to false.
251 bool match_all_frames_; 252 bool match_all_frames_;
252 253
253 // True if the script should be injected into an incognito tab. 254 // True if the script should be injected into an incognito tab.
254 bool incognito_enabled_; 255 bool incognito_enabled_;
255 }; 256 };
256 257
257 typedef std::vector<UserScript> UserScriptList; 258 typedef std::vector<UserScript> UserScriptList;
258 259
259 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_ 260 #endif // CHROME_COMMON_EXTENSIONS_USER_SCRIPT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698