Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / extensions / common / permissions / api_permission.h
index 9fab5e4..aaf1d6e 100644 (file)
@@ -44,7 +44,6 @@ class APIPermission {
     kAudioCapture,
     kAutoTestPrivate,
     kBackground,
-    kBluetooth,
     kBookmark,
     kBookmarkManagerPrivate,
     kBrailleDisplayPrivate,
@@ -90,8 +89,10 @@ class APIPermission {
     kFullscreen,
     kGcm,
     kGeolocation,
+    kHid,
     kHistory,
     kHomepage,
+    kHotwordPrivate,
     kIdentity,
     kIdentityPrivate,
     kIdltest,
@@ -204,8 +205,9 @@ class APIPermission {
   // Returns true if |rhs| is equal to this.
   virtual bool Equal(const APIPermission* rhs) const = 0;
 
-  // Parses the APIPermission from |value|. Returns false if error happens.
-  virtual bool FromValue(const base::Value* value) = 0;
+  // Parses the APIPermission from |value|. Returns false if an error happens
+  // and optionally set |error| if |error| is not NULL.
+  virtual bool FromValue(const base::Value* value, std::string* error) = 0;
 
   // Stores this into a new created |value|.
   virtual scoped_ptr<base::Value> ToValue() const = 0;
@@ -308,8 +310,7 @@ class APIPermissionInfo {
   }
 
  private:
-  // Instances should only be constructed from within a
-  // PermissionsInfo::Delegate.
+  // Instances should only be constructed from within a PermissionsProvider.
   friend class ChromeAPIPermissions;
   // Implementations of APIPermission will want to get the permission message,
   // but this class's implementation should be hidden from everyone else.