Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / extensions / common / permissions / api_permission.h
index 0aa8989..aaf1d6e 100644 (file)
@@ -39,19 +39,17 @@ class APIPermission {
     kActivityLogPrivate,
     kAdView,
     kAlarms,
-    kAppCurrentWindowInternal,
-    kAppRuntime,
-    kAppWindow,
+    kAlwaysOnTopWindows,
     kAudio,
     kAudioCapture,
     kAutoTestPrivate,
     kBackground,
-    kBluetooth,
     kBookmark,
     kBookmarkManagerPrivate,
     kBrailleDisplayPrivate,
     kBrowsingData,
     kCast,
+    kCastStreaming,
     kChromeosInfoPrivate,
     kClipboardRead,
     kClipboardWrite,
@@ -83,14 +81,18 @@ class APIPermission {
     kFileBrowserPrivate,
     kFileSystem,
     kFileSystemDirectory,
+    kFileSystemProvider,
     kFileSystemRetainEntries,
     kFileSystemWrite,
     kFileSystemWriteDirectory,
     kFontSettings,
     kFullscreen,
+    kGcm,
     kGeolocation,
+    kHid,
     kHistory,
     kHomepage,
+    kHotwordPrivate,
     kIdentity,
     kIdentityPrivate,
     kIdltest,
@@ -110,6 +112,7 @@ class APIPermission {
     kNativeMessaging,
     kNetworkingPrivate,
     kNotification,
+    kOverrideEscFullscreen,
     kPageCapture,
     kPointerLock,
     kPlugin,
@@ -121,13 +124,13 @@ class APIPermission {
     kProxy,
     kPushMessaging,
     kImageWriterPrivate,
+    kReadingListPrivate,
     kRtcPrivate,
     kSearchProvider,
     kSerial,
     kSessions,
     kSignedInDevices,
     kSocket,
-    kSocketsUdp,
     kStartupPages,
     kStorage,
     kStreamsPrivate,
@@ -155,15 +158,17 @@ class APIPermission {
     kWebRequest,
     kWebRequestBlocking,
     kWebRequestInternal,
-    kWebRtc,
     kWebrtcAudioPrivate,
     kWebrtcLoggingPrivate,
     kWebstorePrivate,
     kWebView,
+    kScreenlockPrivate,
     kSystemCpu,
     kSystemMemory,
+    kSystemNetwork,
     kSystemInfoCpu,
     kSystemInfoMemory,
+    kFirstRunPrivate,
     kEnumBoundary
   };
 
@@ -200,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;
@@ -304,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.