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

Side by Side Diff: extensions/common/permissions/permissions_data.h

Issue 270153004: Introduce ActiveScriptController; track active extension scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Kalman's Created 6 years, 7 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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_PERMISSIONS_PERMISSIONS_DATA_H_ 5 #ifndef EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 6 #define EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
7 7
8 #include <map> 8 #include <map>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 static bool CanExecuteScriptEverywhere(const Extension* extension); 170 static bool CanExecuteScriptEverywhere(const Extension* extension);
171 171
172 // Returns true if the |extension| is allowed to obtain the contents of a 172 // Returns true if the |extension| is allowed to obtain the contents of a
173 // page as an image. Since a page may contain sensitive information, this 173 // page as an image. Since a page may contain sensitive information, this
174 // is restricted to the extension's host permissions as well as the 174 // is restricted to the extension's host permissions as well as the
175 // extension page itself. 175 // extension page itself.
176 static bool CanCaptureVisiblePage(const Extension* extension, 176 static bool CanCaptureVisiblePage(const Extension* extension,
177 int tab_id, 177 int tab_id,
178 std::string* error); 178 std::string* error);
179 179
180 // Returns true if the user should be alerted to the fact that the given
181 // |extension| is running a script.
not at google - send to devlin 2014/05/08 20:47:09 shorter: Returns true if the user should be alerte
Devlin 2014/05/08 23:01:00 Yay for 20 characters less!
not at google - send to devlin 2014/05/08 23:33:19 Think of all the people that have to read 20 fewer
182 static bool RequiresActionForScriptExecution(const Extension* extension);
183
180 // Parse the permissions of a given extension in the initialization process. 184 // Parse the permissions of a given extension in the initialization process.
181 bool ParsePermissions(Extension* extension, base::string16* error); 185 bool ParsePermissions(Extension* extension, base::string16* error);
182 186
183 // Ensure manifest handlers provide their custom manifest permissions. 187 // Ensure manifest handlers provide their custom manifest permissions.
184 void InitializeManifestPermissions(Extension* extension); 188 void InitializeManifestPermissions(Extension* extension);
185 189
186 // Finalize permissions after the initialization process completes. 190 // Finalize permissions after the initialization process completes.
187 void FinalizePermissions(Extension* extension); 191 void FinalizePermissions(Extension* extension);
188 192
189 private: 193 private:
(...skipping 18 matching lines...) Expand all
208 mutable scoped_refptr<const PermissionSet> active_permissions_; 212 mutable scoped_refptr<const PermissionSet> active_permissions_;
209 213
210 mutable TabPermissionsMap tab_specific_permissions_; 214 mutable TabPermissionsMap tab_specific_permissions_;
211 215
212 DISALLOW_COPY_AND_ASSIGN(PermissionsData); 216 DISALLOW_COPY_AND_ASSIGN(PermissionsData);
213 }; 217 };
214 218
215 } // namespace extensions 219 } // namespace extensions
216 220
217 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_ 221 #endif // EXTENSIONS_COMMON_PERMISSIONS_PERMISSIONS_DATA_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698