| 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/npapi/plugin_instance.h" | 5 #include "webkit/plugins/npapi/plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "build/build_config.h" | 8 #include "build/build_config.h" |
| 9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { | 308 void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { |
| 309 DCHECK(npp_functions_ != 0); | 309 DCHECK(npp_functions_ != 0); |
| 310 DCHECK(npp_functions_->asfile != 0); | 310 DCHECK(npp_functions_->asfile != 0); |
| 311 if (npp_functions_->asfile != 0) { | 311 if (npp_functions_->asfile != 0) { |
| 312 npp_functions_->asfile(npp_, stream, fname); | 312 npp_functions_->asfile(npp_, stream, fname); |
| 313 } | 313 } |
| 314 | 314 |
| 315 // Creating a temporary FilePath instance on the stack as the explicit | 315 // Creating a temporary FilePath instance on the stack as the explicit |
| 316 // FilePath constructor with StringType as an argument causes a compiler | 316 // FilePath constructor with StringType as an argument causes a compiler |
| 317 // error when invoked via vector push back. | 317 // error when invoked via vector push back. |
| 318 FilePath file_name = FilePath::FromWStringHack(UTF8ToWide(fname)); | 318 base::FilePath file_name = base::FilePath::FromWStringHack(UTF8ToWide(fname)); |
| 319 files_created_.push_back(file_name); | 319 files_created_.push_back(file_name); |
| 320 } | 320 } |
| 321 | 321 |
| 322 void PluginInstance::NPP_URLNotify(const char *url, | 322 void PluginInstance::NPP_URLNotify(const char *url, |
| 323 NPReason reason, | 323 NPReason reason, |
| 324 void *notifyData) { | 324 void *notifyData) { |
| 325 DCHECK(npp_functions_ != 0); | 325 DCHECK(npp_functions_ != 0); |
| 326 DCHECK(npp_functions_->urlnotify != 0); | 326 DCHECK(npp_functions_->urlnotify != 0); |
| 327 if (npp_functions_->urlnotify != 0) { | 327 if (npp_functions_->urlnotify != 0) { |
| 328 npp_functions_->urlnotify(npp_, url, reason, notifyData); | 328 npp_functions_->urlnotify(npp_, url, reason, notifyData); |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 plugin_stream->UpdateUrl( | 677 plugin_stream->UpdateUrl( |
| 678 plugin_stream->pending_redirect_url().c_str()); | 678 plugin_stream->pending_redirect_url().c_str()); |
| 679 } | 679 } |
| 680 break; | 680 break; |
| 681 } | 681 } |
| 682 } | 682 } |
| 683 } | 683 } |
| 684 | 684 |
| 685 } // namespace npapi | 685 } // namespace npapi |
| 686 } // namespace webkit | 686 } // namespace webkit |
| OLD | NEW |