| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/glue/plugins/plugin_instance.h" | 5 #include "webkit/glue/plugins/plugin_instance.h" |
| 6 | 6 |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/thread_local_storage.h" | 10 #include "base/thread_local_storage.h" |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { | 275 void PluginInstance::NPP_StreamAsFile(NPStream *stream, const char *fname) { |
| 276 DCHECK(npp_functions_ != 0); | 276 DCHECK(npp_functions_ != 0); |
| 277 DCHECK(npp_functions_->asfile != 0); | 277 DCHECK(npp_functions_->asfile != 0); |
| 278 if (npp_functions_->asfile != 0) { | 278 if (npp_functions_->asfile != 0) { |
| 279 npp_functions_->asfile(npp_, stream, fname); | 279 npp_functions_->asfile(npp_, stream, fname); |
| 280 } | 280 } |
| 281 | 281 |
| 282 // Creating a temporary FilePath instance on the stack as the explicit | 282 // Creating a temporary FilePath instance on the stack as the explicit |
| 283 // FilePath constructor with StringType as an argument causes a compiler | 283 // FilePath constructor with StringType as an argument causes a compiler |
| 284 // error when invoked via vector push back. | 284 // error when invoked via vector push back. |
| 285 FilePath file_name(UTF8ToWide(fname)); | 285 FilePath file_name = FilePath::FromWStringHack(UTF8ToWide(fname)); |
| 286 files_created_.push_back(file_name); | 286 files_created_.push_back(file_name); |
| 287 } | 287 } |
| 288 | 288 |
| 289 void PluginInstance::NPP_URLNotify(const char *url, | 289 void PluginInstance::NPP_URLNotify(const char *url, |
| 290 NPReason reason, | 290 NPReason reason, |
| 291 void *notifyData) { | 291 void *notifyData) { |
| 292 DCHECK(npp_functions_ != 0); | 292 DCHECK(npp_functions_ != 0); |
| 293 DCHECK(npp_functions_->urlnotify != 0); | 293 DCHECK(npp_functions_->urlnotify != 0); |
| 294 if (npp_functions_->urlnotify != 0) { | 294 if (npp_functions_->urlnotify != 0) { |
| 295 npp_functions_->urlnotify(npp_, url, reason, notifyData); | 295 npp_functions_->urlnotify(npp_, url, reason, notifyData); |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 plugin_stream, | 496 plugin_stream, |
| 497 plugin_stream->notify_needed(), | 497 plugin_stream->notify_needed(), |
| 498 plugin_stream->notify_data()); | 498 plugin_stream->notify_data()); |
| 499 break; | 499 break; |
| 500 } | 500 } |
| 501 } | 501 } |
| 502 } | 502 } |
| 503 | 503 |
| 504 } // namespace NPAPI | 504 } // namespace NPAPI |
| 505 | 505 |
| OLD | NEW |