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

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

Issue 288053002: Block content scripts from executing until user grants permission (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CQ Time! 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
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
48 RUN_LOCATION_LAST // Leave this as the last item. 50 RUN_LOCATION_LAST // Leave this as the last item.
49 }; 51 };
50 52
51 // Holds actual script file info. 53 // Holds actual script file info.
52 class File { 54 class File {
53 public: 55 public:
54 File(const base::FilePath& extension_root, 56 File(const base::FilePath& extension_root,
55 const base::FilePath& relative_path, 57 const base::FilePath& relative_path,
56 const GURL& url); 58 const GURL& url);
57 File(); 59 File();
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 261
260 // True if the script should be injected into an incognito tab. 262 // True if the script should be injected into an incognito tab.
261 bool incognito_enabled_; 263 bool incognito_enabled_;
262 }; 264 };
263 265
264 typedef std::vector<UserScript> UserScriptList; 266 typedef std::vector<UserScript> UserScriptList;
265 267
266 } // namespace extensions 268 } // namespace extensions
267 269
268 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_ 270 #endif // EXTENSIONS_COMMON_USER_SCRIPT_H_
OLDNEW
« no previous file with comments | « extensions/common/permissions/permissions_data.cc ('k') | extensions/renderer/dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698