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

Side by Side Diff: chrome/common/extensions/permissions/api_permission.h

Issue 11413099: Bluetooth API Permission Dialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix memory leak Created 8 years 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_PERMISSIONS_API_PERMISSION_H_ 5 #ifndef CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_
6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ 6 #define CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 28 matching lines...) Expand all
39 // Real permissions. 39 // Real permissions.
40 kActiveTab, 40 kActiveTab,
41 kAlarms, 41 kAlarms,
42 kAppCurrentWindowInternal, 42 kAppCurrentWindowInternal,
43 kAppNotifications, 43 kAppNotifications,
44 kAppRuntime, 44 kAppRuntime,
45 kAppWindow, 45 kAppWindow,
46 kAudioCapture, 46 kAudioCapture,
47 kBackground, 47 kBackground,
48 kBluetooth, 48 kBluetooth,
49 kBluetoothDevice,
49 kBookmark, 50 kBookmark,
50 kBookmarkManagerPrivate, 51 kBookmarkManagerPrivate,
51 kBrowsingData, 52 kBrowsingData,
52 kChromeosInfoPrivate, 53 kChromeosInfoPrivate,
53 kClipboardRead, 54 kClipboardRead,
54 kClipboardWrite, 55 kClipboardWrite,
55 kCloudPrintPrivate, 56 kCloudPrintPrivate,
56 kContentSettings, 57 kContentSettings,
57 kContextMenus, 58 kContextMenus,
58 kCookie, 59 kCookie,
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 ID id() const; 127 ID id() const;
127 128
128 // Returns the name of this permission. 129 // Returns the name of this permission.
129 const char* name() const; 130 const char* name() const;
130 131
131 // Returns the APIPermission of this permission. 132 // Returns the APIPermission of this permission.
132 const APIPermissionInfo* info() const { 133 const APIPermissionInfo* info() const {
133 return info_; 134 return info_;
134 } 135 }
135 136
137 // Returns a string representation of this permissions. The default string
138 // representation is the name of the permission.
139 virtual std::string ToString() const;
140
141 // Returns true if this permission cannot be found in the manifest.
142 virtual bool ManifestEntryForbidden() const;
143
136 // Returns true if this permission has any PermissionMessages. 144 // Returns true if this permission has any PermissionMessages.
137 virtual bool HasMessages() const = 0; 145 virtual bool HasMessages() const = 0;
138 146
139 // Returns the localized permission messages of this permission. 147 // Returns the localized permission messages of this permission.
140 virtual PermissionMessages GetMessages() const = 0; 148 virtual PermissionMessages GetMessages() const = 0;
141 149
142 // Returns true if the given permission is allowed. 150 // Returns true if the given permission is allowed.
143 virtual bool Check(const CheckParam* param) const = 0; 151 virtual bool Check(const CheckParam* param) const = 0;
144 152
145 // Returns true if |rhs| is a subset of this. 153 // Returns true if |rhs| is a subset of this.
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 const char* const name_; 275 const char* const name_;
268 const int flags_; 276 const int flags_;
269 const int l10n_message_id_; 277 const int l10n_message_id_;
270 const PermissionMessage::ID message_id_; 278 const PermissionMessage::ID message_id_;
271 const APIPermissionConstructor api_permission_constructor_; 279 const APIPermissionConstructor api_permission_constructor_;
272 }; 280 };
273 281
274 } // namespace extensions 282 } // namespace extensions
275 283
276 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_ 284 #endif // CHROME_COMMON_EXTENSIONS_PERMISSIONS_API_PERMISSION_H_
OLDNEW
« no previous file with comments | « chrome/common/extensions/extension_manifest_constants.cc ('k') | chrome/common/extensions/permissions/api_permission.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698