| 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 // TODO : Support NP_ASFILEONLY mode | 5 // TODO : Support NP_ASFILEONLY mode |
| 6 // TODO : Support NP_SEEK mode | 6 // TODO : Support NP_SEEK mode |
| 7 // TODO : Support SEEKABLE=true in NewStream | 7 // TODO : Support SEEKABLE=true in NewStream |
| 8 | 8 |
| 9 #include "webkit/plugins/npapi/plugin_stream.h" | 9 #include "content/child/npapi/plugin_stream.h" |
| 10 | 10 |
| 11 #include <algorithm> | 11 #include <algorithm> |
| 12 | 12 |
| 13 #include "base/bind.h" | 13 #include "base/bind.h" |
| 14 #include "base/message_loop/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
| 15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
| 16 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
| 17 #include "content/child/npapi/plugin_instance.h" |
| 17 #include "net/base/mime_util.h" | 18 #include "net/base/mime_util.h" |
| 18 #include "url/gurl.h" | 19 #include "url/gurl.h" |
| 19 #include "webkit/plugins/npapi/plugin_instance.h" | |
| 20 | 20 |
| 21 namespace webkit { | 21 namespace content { |
| 22 namespace npapi { | |
| 23 | 22 |
| 24 PluginStream::PluginStream( | 23 PluginStream::PluginStream( |
| 25 PluginInstance* instance, | 24 PluginInstance* instance, |
| 26 const char* url, | 25 const char* url, |
| 27 bool need_notify, | 26 bool need_notify, |
| 28 void* notify_data) | 27 void* notify_data) |
| 29 : instance_(instance), | 28 : instance_(instance), |
| 30 notify_needed_(need_notify), | 29 notify_needed_(need_notify), |
| 31 notify_data_(notify_data), | 30 notify_data_(notify_data), |
| 32 close_on_write_data_(false), | 31 close_on_write_data_(false), |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 instance_->NPP_URLNotify(stream_.url, reason, notify_data_); | 277 instance_->NPP_URLNotify(stream_.url, reason, notify_data_); |
| 279 notify_needed_ = false; | 278 notify_needed_ = false; |
| 280 } | 279 } |
| 281 } | 280 } |
| 282 | 281 |
| 283 bool PluginStream::RequestedPluginModeIsAsFile() const { | 282 bool PluginStream::RequestedPluginModeIsAsFile() const { |
| 284 return (requested_plugin_mode_ == NP_ASFILE || | 283 return (requested_plugin_mode_ == NP_ASFILE || |
| 285 requested_plugin_mode_ == NP_ASFILEONLY); | 284 requested_plugin_mode_ == NP_ASFILEONLY); |
| 286 } | 285 } |
| 287 | 286 |
| 288 } // namespace npapi | 287 } // namespace content |
| 289 } // namespace webkit | |
| OLD | NEW |