| OLD | NEW |
| 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 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_file_system_impl.h" |
| 6 | 6 |
| 7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
| 8 #include "ppapi/c/pp_completion_callback.h" | 8 #include "ppapi/c/pp_completion_callback.h" |
| 9 #include "ppapi/c/ppb_file_system.h" | 9 #include "ppapi/c/ppb_file_system.h" |
| 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
| 14 #include "webkit/fileapi/file_system_types.h" | 14 #include "webkit/fileapi/file_system_types.h" |
| 15 #include "webkit/plugins/ppapi/common.h" | 15 #include "webkit/plugins/ppapi/common.h" |
| 16 #include "webkit/plugins/ppapi/file_callbacks.h" | 16 #include "webkit/plugins/ppapi/file_callbacks.h" |
| 17 #include "webkit/plugins/ppapi/plugin_delegate.h" | 17 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 18 #include "webkit/plugins/ppapi/plugin_module.h" | 18 #include "webkit/plugins/ppapi/plugin_module.h" |
| 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 19 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 20 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" | |
| 21 #include "webkit/plugins/ppapi/resource_helper.h" | 20 #include "webkit/plugins/ppapi/resource_helper.h" |
| 22 | 21 |
| 23 using ppapi::thunk::PPB_FileSystem_API; | 22 using ppapi::thunk::PPB_FileSystem_API; |
| 24 using ppapi::TrackedCallback; | 23 using ppapi::TrackedCallback; |
| 25 | 24 |
| 26 namespace webkit { | 25 namespace webkit { |
| 27 namespace ppapi { | 26 namespace ppapi { |
| 28 | 27 |
| 29 PPB_FileSystem_Impl::PPB_FileSystem_Impl(PP_Instance instance, | 28 PPB_FileSystem_Impl::PPB_FileSystem_Impl(PP_Instance instance, |
| 30 PP_FileSystemType type) | 29 PP_FileSystemType type) |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 | 75 |
| 77 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 76 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 78 if (!plugin_instance) | 77 if (!plugin_instance) |
| 79 return PP_ERROR_FAILED; | 78 return PP_ERROR_FAILED; |
| 80 | 79 |
| 81 if (!plugin_instance->delegate()->OpenFileSystem( | 80 if (!plugin_instance->delegate()->OpenFileSystem( |
| 82 GURL(plugin_instance->container()->element().document().url()). | 81 GURL(plugin_instance->container()->element().document().url()). |
| 83 GetOrigin(), | 82 GetOrigin(), |
| 84 file_system_type, expected_size, | 83 file_system_type, expected_size, |
| 85 new FileCallbacks(this, callback, NULL, | 84 new FileCallbacks(this, callback, NULL, |
| 86 scoped_refptr<PPB_FileSystem_Impl>(this), NULL))) | 85 scoped_refptr<PPB_FileSystem_Impl>(this)))) |
| 87 return PP_ERROR_FAILED; | 86 return PP_ERROR_FAILED; |
| 88 return PP_OK_COMPLETIONPENDING; | 87 return PP_OK_COMPLETIONPENDING; |
| 89 } | 88 } |
| 90 | 89 |
| 91 PP_FileSystemType PPB_FileSystem_Impl::GetType() { | 90 PP_FileSystemType PPB_FileSystem_Impl::GetType() { |
| 92 return type_; | 91 return type_; |
| 93 } | 92 } |
| 94 | 93 |
| 95 } // namespace ppapi | 94 } // namespace ppapi |
| 96 } // namespace webkit | 95 } // namespace webkit |
| OLD | NEW |