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

Side by Side Diff: trunk/src/extensions/common/user_script.h

Issue 307933008: Revert 273866 "Block content scripts from executing until user g..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
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 27 matching lines...) Expand all
38 enum RunLocation { 38 enum RunLocation {
39 UNDEFINED, 39 UNDEFINED,
40 DOCUMENT_START, // After the documentElement is created, but before 40 DOCUMENT_START, // After the documentElement is created, but before
41 // anything else happens. 41 // anything else happens.
42 DOCUMENT_END, // After the entire document is parsed. Same as 42 DOCUMENT_END, // After the entire document is parsed. Same as
43 // DOMContentLoaded. 43 // DOMContentLoaded.
44 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document 44 DOCUMENT_IDLE, // Sometime after DOMContentLoaded, as soon as the document
45 // is "idle". Currently this uses the simple heuristic of: 45 // is "idle". Currently this uses the simple heuristic of:
46 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no 46 // min(DOM_CONTENT_LOADED + TIMEOUT, ONLOAD), but no
47 // particular injection point is guaranteed. 47 // particular injection point is guaranteed.
48 RUN_DEFERRED, // The user script's injection was deferred for permissions
49 // reasons, and was executed at a later time.
50 RUN_LOCATION_LAST // Leave this as the last item. 48 RUN_LOCATION_LAST // Leave this as the last item.
51 }; 49 };
52 50
53 // Holds actual script file info. 51 // Holds actual script file info.
54 class File { 52 class File {
55 public: 53 public:
56 File(const base::FilePath& extension_root, 54 File(const base::FilePath& extension_root,
57 const base::FilePath& relative_path, 55 const base::FilePath& relative_path,
58 const GURL& url); 56 const GURL& url);
59 File(); 57 File();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 259
262 // True if the script should be injected into an incognito tab. 260 // True if the script should be injected into an incognito tab.
263 bool incognito_enabled_; 261 bool incognito_enabled_;
264 }; 262 };
265 263
266 typedef std::vector<UserScript> UserScriptList; 264 typedef std::vector<UserScript> UserScriptList;
267 265
268 } // namespace extensions 266 } // namespace extensions
269 267
270 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ 268 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_
OLDNEW
« no previous file with comments | « trunk/src/extensions/common/permissions/permissions_data.cc ('k') | trunk/src/extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698