Commit 8a2484bd authored by michaelpg's avatar michaelpg Committed by Commit Bot

Move chrome.fileSystem interface and bindings to //extensions

BUG=729713
R=rdevlin.cronin@chromium.org

Review-Url: https://codereview.chromium.org/2939833002
Cr-Commit-Position: refs/heads/master@{#487365}
parent 0375ae80
...@@ -479,10 +479,6 @@ ...@@ -479,10 +479,6 @@
"dependencies": ["permission:fileManagerPrivate"], "dependencies": ["permission:fileManagerPrivate"],
"contexts": ["blessed_extension"] "contexts": ["blessed_extension"]
}, },
"fileSystem": {
"dependencies": ["permission:fileSystem"],
"contexts": ["blessed_extension"]
},
"fileSystemProvider": { "fileSystemProvider": {
"dependencies": ["permission:fileSystemProvider"], "dependencies": ["permission:fileSystemProvider"],
"contexts": ["blessed_extension"] "contexts": ["blessed_extension"]
......
...@@ -343,54 +343,6 @@ ...@@ -343,54 +343,6 @@
"397F221E63F86BE34C30165613E95B6CC8D22A52" // http://crbug.com/415846 "397F221E63F86BE34C30165613E95B6CC8D22A52" // http://crbug.com/415846
] ]
}, },
"fileSystem": [{
"channel": "stable",
"extension_types": ["platform_app"],
"default_parent": true
},{
"channel": "stable",
"extension_types": ["extension"],
"whitelist": [
"2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
"3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
"12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
"D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
"D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
"3F65507A3B39259B38C8173C6FFA3D12DF64CCE9", // http://crbug.com/371562
"2B6C6A4A5940017146F3E58B7F90116206E84685", // http://crbug.com/642141
"B6C2EFAB3EC3BF6EF03701408B6B09A67B2D0069", // http://crbug.com/642141
"96FF2FFA5C9173C76D47184B3E86D267B37781DE", // http://crbug.com/642141
"0136FCB13DB29FD5CD442F56E59E53B61F1DF96F" // http://crbug.com/642141
]
}],
"fileSystem.directory": {
"channel": "stable",
"extension_types": ["platform_app"]
},
"fileSystem.retainEntries": {
"channel": "stable",
"extension_types": ["platform_app"]
},
"fileSystem.write": [{
"channel": "stable",
"extension_types": ["platform_app"]
},{
"channel": "stable",
"extension_types": ["extension"],
"whitelist": [
"2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
"3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
"12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
"D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
"D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
"3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
]
}],
"fileSystem.requestFileSystem": {
"channel": "stable",
"extension_types": ["platform_app"],
"platforms": ["chromeos"]
},
"fileSystemProvider": [{ "fileSystemProvider": [{
"channel": "stable", "channel": "stable",
"extension_types": ["extension", "platform_app"], "extension_types": ["extension", "platform_app"],
......
...@@ -216,18 +216,7 @@ ChromeAPIPermissions::GetAllPermissions() const { ...@@ -216,18 +216,7 @@ ChromeAPIPermissions::GetAllPermissions() const {
// Platform-app permissions. // Platform-app permissions.
// The permission string for "fileSystem" is only shown when
// "write" or "directory" is present. Read-only access is only
// granted after the user has been shown a file or directory
// chooser dialog and selected a file or directory. Selecting
// the file or directory is considered consent to read it.
{APIPermission::kFileSystem, "fileSystem"},
{APIPermission::kFileSystemDirectory, "fileSystem.directory"},
{APIPermission::kFileSystemProvider, "fileSystemProvider"}, {APIPermission::kFileSystemProvider, "fileSystemProvider"},
{APIPermission::kFileSystemRequestFileSystem,
"fileSystem.requestFileSystem"},
{APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries"},
{APIPermission::kFileSystemWrite, "fileSystem.write"},
{APIPermission::kMediaGalleries, "mediaGalleries", {APIPermission::kMediaGalleries, "mediaGalleries",
APIPermissionInfo::kFlagNone, APIPermissionInfo::kFlagNone,
&CreateAPIPermission<MediaGalleriesPermission>}, &CreateAPIPermission<MediaGalleriesPermission>},
......
...@@ -306,8 +306,6 @@ static_library("renderer") { ...@@ -306,8 +306,6 @@ static_library("renderer") {
"resources/extensions/declarative_content_custom_bindings.js", "resources/extensions/declarative_content_custom_bindings.js",
"resources/extensions/enterprise_platform_keys_custom_bindings.js", "resources/extensions/enterprise_platform_keys_custom_bindings.js",
"resources/extensions/feedback_private_custom_bindings.js", "resources/extensions/feedback_private_custom_bindings.js",
"resources/extensions/file_entry_binding_util.js",
"resources/extensions/file_system_custom_bindings.js",
"resources/extensions/gcm_custom_bindings.js", "resources/extensions/gcm_custom_bindings.js",
"resources/extensions/identity_custom_bindings.js", "resources/extensions/identity_custom_bindings.js",
"resources/extensions/image_writer_private_custom_bindings.js", "resources/extensions/image_writer_private_custom_bindings.js",
......
...@@ -179,7 +179,6 @@ void ChromeExtensionsDispatcherDelegate::PopulateSourceMap( ...@@ -179,7 +179,6 @@ void ChromeExtensionsDispatcherDelegate::PopulateSourceMap(
source_map->RegisterSource("downloads", IDR_DOWNLOADS_CUSTOM_BINDINGS_JS); source_map->RegisterSource("downloads", IDR_DOWNLOADS_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("feedbackPrivate", source_map->RegisterSource("feedbackPrivate",
IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS); IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("fileSystem", IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("gcm", IDR_GCM_CUSTOM_BINDINGS_JS); source_map->RegisterSource("gcm", IDR_GCM_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("identity", IDR_IDENTITY_CUSTOM_BINDINGS_JS); source_map->RegisterSource("identity", IDR_IDENTITY_CUSTOM_BINDINGS_JS);
source_map->RegisterSource("imageWriterPrivate", source_map->RegisterSource("imageWriterPrivate",
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
<include name="IDR_DEVELOPER_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\developer_private_custom_bindings.js" type="BINDATA" /> <include name="IDR_DEVELOPER_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\developer_private_custom_bindings.js" type="BINDATA" />
<include name="IDR_DOWNLOADS_CUSTOM_BINDINGS_JS" file="extensions\downloads_custom_bindings.js" type="BINDATA" /> <include name="IDR_DOWNLOADS_CUSTOM_BINDINGS_JS" file="extensions\downloads_custom_bindings.js" type="BINDATA" />
<include name="IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\feedback_private_custom_bindings.js" type="BINDATA" /> <include name="IDR_FEEDBACK_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\feedback_private_custom_bindings.js" type="BINDATA" />
<include name="IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS" file="extensions\file_system_custom_bindings.js" type="BINDATA" />
<include name="IDR_GCM_CUSTOM_BINDINGS_JS" file="extensions\gcm_custom_bindings.js" type="BINDATA" /> <include name="IDR_GCM_CUSTOM_BINDINGS_JS" file="extensions\gcm_custom_bindings.js" type="BINDATA" />
<include name="IDR_IDENTITY_CUSTOM_BINDINGS_JS" file="extensions\identity_custom_bindings.js" type="BINDATA" /> <include name="IDR_IDENTITY_CUSTOM_BINDINGS_JS" file="extensions\identity_custom_bindings.js" type="BINDATA" />
<include name="IDR_IMAGE_WRITER_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\image_writer_private_custom_bindings.js" type="BINDATA" /> <include name="IDR_IMAGE_WRITER_PRIVATE_CUSTOM_BINDINGS_JS" file="extensions\image_writer_private_custom_bindings.js" type="BINDATA" />
......
...@@ -173,6 +173,10 @@ ...@@ -173,6 +173,10 @@
"contexts": "all", "contexts": "all",
"matches": ["<all_urls>"] "matches": ["<all_urls>"]
}, },
"fileSystem": {
"dependencies": ["permission:fileSystem"],
"contexts": ["blessed_extension"]
},
"guestViewInternal": [ "guestViewInternal": [
{ {
"internal": true, "internal": true,
......
...@@ -226,6 +226,54 @@ ...@@ -226,6 +226,54 @@
"A28C9619C4C41306FA5236FB4D94DA812F504DE8" // http://crbug.com/429886 "A28C9619C4C41306FA5236FB4D94DA812F504DE8" // http://crbug.com/429886
] ]
}, },
"fileSystem": [{
"channel": "stable",
"extension_types": ["platform_app"],
"default_parent": true
},{
"channel": "stable",
"extension_types": ["extension"],
"whitelist": [
"2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
"3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
"12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
"D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
"D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
"3F65507A3B39259B38C8173C6FFA3D12DF64CCE9", // http://crbug.com/371562
"2B6C6A4A5940017146F3E58B7F90116206E84685", // http://crbug.com/642141
"B6C2EFAB3EC3BF6EF03701408B6B09A67B2D0069", // http://crbug.com/642141
"96FF2FFA5C9173C76D47184B3E86D267B37781DE", // http://crbug.com/642141
"0136FCB13DB29FD5CD442F56E59E53B61F1DF96F" // http://crbug.com/642141
]
}],
"fileSystem.directory": {
"channel": "stable",
"extension_types": ["platform_app"]
},
"fileSystem.retainEntries": {
"channel": "stable",
"extension_types": ["platform_app"]
},
"fileSystem.write": [{
"channel": "stable",
"extension_types": ["platform_app"]
},{
"channel": "stable",
"extension_types": ["extension"],
"whitelist": [
"2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
"3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
"12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
"D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
"D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
"3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
]
}],
"fileSystem.requestFileSystem": {
"channel": "stable",
"extension_types": ["platform_app"],
"platforms": ["chromeos"]
},
"hid": [ "hid": [
{ {
"channel": "stable", "channel": "stable",
......
...@@ -58,6 +58,19 @@ ExtensionsAPIPermissions::GetAllPermissions() const { ...@@ -58,6 +58,19 @@ ExtensionsAPIPermissions::GetAllPermissions() const {
{APIPermission::kExternallyConnectableAllUrls, {APIPermission::kExternallyConnectableAllUrls,
"externally_connectable.all_urls"}, "externally_connectable.all_urls"},
{APIPermission::kFullscreen, "app.window.fullscreen"}, {APIPermission::kFullscreen, "app.window.fullscreen"},
// The permission string for "fileSystem" is only shown when
// "write" or "directory" is present. Read-only access is only
// granted after the user has been shown a file or directory
// chooser dialog and selected a file or directory. Selecting
// the file or directory is considered consent to read it.
{APIPermission::kFileSystem, "fileSystem"},
{APIPermission::kFileSystemDirectory, "fileSystem.directory"},
{APIPermission::kFileSystemRequestFileSystem,
"fileSystem.requestFileSystem"},
{APIPermission::kFileSystemRetainEntries, "fileSystem.retainEntries"},
{APIPermission::kFileSystemWrite, "fileSystem.write"},
{APIPermission::kHid, "hid"}, {APIPermission::kHid, "hid"},
{APIPermission::kImeWindowEnabled, "app.window.ime"}, {APIPermission::kImeWindowEnabled, "app.window.ime"},
{APIPermission::kOverrideEscFullscreen, {APIPermission::kOverrideEscFullscreen,
......
...@@ -162,6 +162,8 @@ source_set("renderer") { ...@@ -162,6 +162,8 @@ source_set("renderer") {
"resources/extension.css", "resources/extension.css",
"resources/extension_custom_bindings.js", "resources/extension_custom_bindings.js",
"resources/extension_fonts.css", "resources/extension_fonts.css",
"resources/file_entry_binding_util.js",
"resources/file_system_custom_bindings.js",
"resources/greasemonkey_api.js", "resources/greasemonkey_api.js",
"resources/guest_view/app_view/app_view.js", "resources/guest_view/app_view/app_view.js",
"resources/guest_view/extension_options/extension_options.js", "resources/guest_view/extension_options/extension_options.js",
......
...@@ -704,6 +704,7 @@ std::vector<std::pair<const char*, int>> Dispatcher::GetJsResources() { ...@@ -704,6 +704,7 @@ std::vector<std::pair<const char*, int>> Dispatcher::GetJsResources() {
{"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS}, {"extensionViewEvents", IDR_EXTENSION_VIEW_EVENTS_JS},
{"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS}, {"extensionViewInternal", IDR_EXTENSION_VIEW_INTERNAL_CUSTOM_BINDINGS_JS},
{"fileEntryBindingUtil", IDR_FILE_ENTRY_BINDING_UTIL_JS}, {"fileEntryBindingUtil", IDR_FILE_ENTRY_BINDING_UTIL_JS},
{"fileSystem", IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS},
{"guestView", IDR_GUEST_VIEW_JS}, {"guestView", IDR_GUEST_VIEW_JS},
{"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS}, {"guestViewAttributes", IDR_GUEST_VIEW_ATTRIBUTES_JS},
{"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS}, {"guestViewContainer", IDR_GUEST_VIEW_CONTAINER_JS},
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
<include name="IDR_DISPLAY_SOURCE_CUSTOM_BINDINGS_JS" file="display_source_custom_bindings.js" type="BINDATA" /> <include name="IDR_DISPLAY_SOURCE_CUSTOM_BINDINGS_JS" file="display_source_custom_bindings.js" type="BINDATA" />
<include name="IDR_EXTENSION_CUSTOM_BINDINGS_JS" file="extension_custom_bindings.js" type="BINDATA" /> <include name="IDR_EXTENSION_CUSTOM_BINDINGS_JS" file="extension_custom_bindings.js" type="BINDATA" />
<include name="IDR_FILE_ENTRY_BINDING_UTIL_JS" file="file_entry_binding_util.js" type="BINDATA" /> <include name="IDR_FILE_ENTRY_BINDING_UTIL_JS" file="file_entry_binding_util.js" type="BINDATA" />
<include name="IDR_FILE_SYSTEM_CUSTOM_BINDINGS_JS" file="file_system_custom_bindings.js" type="BINDATA" />
<include name="IDR_GREASEMONKEY_API_JS" file="greasemonkey_api.js" type="BINDATA" /> <include name="IDR_GREASEMONKEY_API_JS" file="greasemonkey_api.js" type="BINDATA" />
<include name="IDR_I18N_CUSTOM_BINDINGS_JS" file="i18n_custom_bindings.js" type="BINDATA" /> <include name="IDR_I18N_CUSTOM_BINDINGS_JS" file="i18n_custom_bindings.js" type="BINDATA" />
<include name="IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS" file="mojo_private_custom_bindings.js" type="BINDATA" /> <include name="IDR_MOJO_PRIVATE_CUSTOM_BINDINGS_JS" file="mojo_private_custom_bindings.js" type="BINDATA" />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment