| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/browser/renderer_host/pepper/pepper_file_io_host.h" | 5 #include "content/browser/renderer_host/pepper/pepper_file_io_host.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 } | 103 } |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace | 106 } // namespace |
| 107 | 107 |
| 108 PepperFileIOHost::PepperFileIOHost(BrowserPpapiHostImpl* host, | 108 PepperFileIOHost::PepperFileIOHost(BrowserPpapiHostImpl* host, |
| 109 PP_Instance instance, | 109 PP_Instance instance, |
| 110 PP_Resource resource) | 110 PP_Resource resource) |
| 111 : ResourceHost(host->GetPpapiHost(), instance, resource), | 111 : ResourceHost(host->GetPpapiHost(), instance, resource), |
| 112 browser_ppapi_host_(host), | 112 browser_ppapi_host_(host), |
| 113 file_(BrowserThread::GetMessageLoopProxyForThread(BrowserThread::FILE) | 113 file_(BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE).get()), |
| 114 .get()), | |
| 115 open_flags_(0), | 114 open_flags_(0), |
| 116 file_system_type_(PP_FILESYSTEMTYPE_INVALID), | 115 file_system_type_(PP_FILESYSTEMTYPE_INVALID), |
| 117 max_written_offset_(0), | 116 max_written_offset_(0), |
| 118 check_quota_(false) { | 117 check_quota_(false) { |
| 119 int unused; | 118 int unused; |
| 120 if (!host->GetRenderFrameIDsForInstance( | 119 if (!host->GetRenderFrameIDsForInstance( |
| 121 instance, &render_process_id_, &unused)) { | 120 instance, &render_process_id_, &unused)) { |
| 122 render_process_id_ = -1; | 121 render_process_id_ = -1; |
| 123 } | 122 } |
| 124 } | 123 } |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 | 485 |
| 487 ppapi::proxy::SerializedHandle file_handle; | 486 ppapi::proxy::SerializedHandle file_handle; |
| 488 // A non-zero resource id signals NaClIPCAdapter to create a NaClQuotaDesc. | 487 // A non-zero resource id signals NaClIPCAdapter to create a NaClQuotaDesc. |
| 489 PP_Resource quota_file_io = check_quota_ ? pp_resource() : 0; | 488 PP_Resource quota_file_io = check_quota_ ? pp_resource() : 0; |
| 490 file_handle.set_file_handle(transit_file, open_flags, quota_file_io); | 489 file_handle.set_file_handle(transit_file, open_flags, quota_file_io); |
| 491 reply_context->params.AppendHandle(file_handle); | 490 reply_context->params.AppendHandle(file_handle); |
| 492 return true; | 491 return true; |
| 493 } | 492 } |
| 494 | 493 |
| 495 } // namespace content | 494 } // namespace content |
| OLD | NEW |