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_file_chooser_host.h" | 5 #include "content/renderer/pepper/pepper_file_chooser_host.h" |
6 | 6 |
7 #include "base/file_path.h" | 7 #include "base/file_path.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "content/public/renderer/renderer_ppapi_host.h" | 9 #include "content/public/renderer/renderer_ppapi_host.h" |
10 #include "content/renderer/render_view_impl.h" | 10 #include "content/renderer/render_view_impl.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 handler_ = new CompletionHandler(AsWeakPtr()); | 160 handler_ = new CompletionHandler(AsWeakPtr()); |
161 RenderViewImpl* render_view = static_cast<RenderViewImpl*>( | 161 RenderViewImpl* render_view = static_cast<RenderViewImpl*>( |
162 renderer_ppapi_host_->GetRenderViewForInstance(pp_instance())); | 162 renderer_ppapi_host_->GetRenderViewForInstance(pp_instance())); |
163 if (!render_view || !render_view->runFileChooser(params, handler_)) { | 163 if (!render_view || !render_view->runFileChooser(params, handler_)) { |
164 delete handler_; | 164 delete handler_; |
165 handler_ = NULL; | 165 handler_ = NULL; |
166 return PP_ERROR_NOACCESS; | 166 return PP_ERROR_NOACCESS; |
167 } | 167 } |
168 | 168 |
169 reply_params_ = ppapi::proxy::ResourceMessageReplyParams( | 169 reply_params_ = context->MakeReplyParams(); |
170 context->params.pp_resource(), | |
171 context->params.sequence()); | |
172 return PP_OK_COMPLETIONPENDING; | 170 return PP_OK_COMPLETIONPENDING; |
173 } | 171 } |
174 | 172 |
175 } // namespace content | 173 } // namespace content |
176 | 174 |
OLD | NEW |