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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <cstddef> | 8 #include <cstddef> |
9 #include <map> | 9 #include <map> |
10 #include <queue> | 10 #include <queue> |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 } | 288 } |
289 virtual void DidOpenFileSystem(const std::string& name, | 289 virtual void DidOpenFileSystem(const std::string& name, |
290 const GURL& root) OVERRIDE { | 290 const GURL& root) OVERRIDE { |
291 NOTREACHED(); | 291 NOTREACHED(); |
292 } | 292 } |
293 | 293 |
294 virtual void DidFail(base::PlatformFileError error_code) OVERRIDE { | 294 virtual void DidFail(base::PlatformFileError error_code) OVERRIDE { |
295 base::PlatformFile invalid_file = base::kInvalidPlatformFileValue; | 295 base::PlatformFile invalid_file = base::kInvalidPlatformFileValue; |
296 callback_.Run(error_code, | 296 callback_.Run(error_code, |
297 base::PassPlatformFile(&invalid_file), | 297 base::PassPlatformFile(&invalid_file), |
| 298 quota::kQuotaLimitTypeUnknown, |
298 webkit::ppapi::PluginDelegate::NotifyCloseFileCallback()); | 299 webkit::ppapi::PluginDelegate::NotifyCloseFileCallback()); |
299 } | 300 } |
300 | 301 |
301 virtual void DidWrite(int64 bytes, bool complete) OVERRIDE { | 302 virtual void DidWrite(int64 bytes, bool complete) OVERRIDE { |
302 NOTREACHED(); | 303 NOTREACHED(); |
303 } | 304 } |
304 | 305 |
305 virtual void DidOpenFile(base::PlatformFile file) OVERRIDE { | 306 virtual void DidOpenFile(base::PlatformFile file, |
| 307 quota::QuotaLimitType quota_policy) OVERRIDE { |
306 callback_.Run(base::PLATFORM_FILE_OK, | 308 callback_.Run(base::PLATFORM_FILE_OK, |
307 base::PassPlatformFile(&file), | 309 base::PassPlatformFile(&file), |
| 310 quota_policy, |
308 close_file_callback_); | 311 close_file_callback_); |
309 // Make sure we won't leak file handle if the requester has died. | 312 // Make sure we won't leak file handle if the requester has died. |
310 if (file != base::kInvalidPlatformFileValue) { | 313 if (file != base::kInvalidPlatformFileValue) { |
311 base::FileUtilProxy::Close( | 314 base::FileUtilProxy::Close( |
312 RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(), file, | 315 RenderThreadImpl::current()->GetFileThreadMessageLoopProxy(), file, |
313 close_file_callback_); | 316 close_file_callback_); |
314 } | 317 } |
315 } | 318 } |
316 | 319 |
317 private: | 320 private: |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1613 base::PlatformFile handle, | 1616 base::PlatformFile handle, |
1614 base::ProcessId target_process_id, | 1617 base::ProcessId target_process_id, |
1615 bool should_close_source) const { | 1618 bool should_close_source) const { |
1616 return BrokerGetFileHandleForProcess( | 1619 return BrokerGetFileHandleForProcess( |
1617 handle, | 1620 handle, |
1618 target_process_id, | 1621 target_process_id, |
1619 should_close_source); | 1622 should_close_source); |
1620 } | 1623 } |
1621 | 1624 |
1622 } // namespace content | 1625 } // namespace content |
OLD | NEW |