| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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" |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 return PP_ERROR_FAILED; | 76 return PP_ERROR_FAILED; |
| 77 } | 77 } |
| 78 | 78 |
| 79 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); | 79 PluginInstance* plugin_instance = ResourceHelper::GetPluginInstance(this); |
| 80 if (!plugin_instance) | 80 if (!plugin_instance) |
| 81 return PP_ERROR_FAILED; | 81 return PP_ERROR_FAILED; |
| 82 | 82 |
| 83 if (!plugin_instance->delegate()->OpenFileSystem( | 83 if (!plugin_instance->delegate()->OpenFileSystem( |
| 84 plugin_instance->container()->element().document().url(), | 84 plugin_instance->container()->element().document().url(), |
| 85 file_system_type, expected_size, | 85 file_system_type, expected_size, |
| 86 new FileCallbacks(plugin_instance->module()->AsWeakPtr(), | 86 new FileCallbacks(this, callback, NULL, |
| 87 pp_resource(), callback, NULL, | |
| 88 scoped_refptr<PPB_FileSystem_Impl>(this), NULL))) | 87 scoped_refptr<PPB_FileSystem_Impl>(this), NULL))) |
| 89 return PP_ERROR_FAILED; | 88 return PP_ERROR_FAILED; |
| 90 return PP_OK_COMPLETIONPENDING; | 89 return PP_OK_COMPLETIONPENDING; |
| 91 } | 90 } |
| 92 | 91 |
| 93 PP_FileSystemType PPB_FileSystem_Impl::GetType() { | 92 PP_FileSystemType PPB_FileSystem_Impl::GetType() { |
| 94 return type_; | 93 return type_; |
| 95 } | 94 } |
| 96 | 95 |
| 97 } // namespace ppapi | 96 } // namespace ppapi |
| 98 } // namespace webkit | 97 } // namespace webkit |
| OLD | NEW |