| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_stream_url.h" | 5 #include "webkit/glue/plugins/plugin_stream_url.h" |
| 6 | 6 |
| 7 #include "net/http/http_response_headers.h" | 7 #include "net/http/http_response_headers.h" |
| 8 #include "webkit/glue/plugins/plugin_host.h" | 8 #include "webkit/glue/plugins/plugin_host.h" |
| 9 #include "webkit/glue/plugins/plugin_instance.h" | 9 #include "webkit/glue/plugins/plugin_instance.h" |
| 10 #include "webkit/glue/plugins/plugin_lib.h" | 10 #include "webkit/glue/plugins/plugin_lib.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 void PluginStreamUrl::DidFinishLoading() { | 99 void PluginStreamUrl::DidFinishLoading() { |
| 100 if (!seekable()) { | 100 if (!seekable()) { |
| 101 Close(NPRES_DONE); | 101 Close(NPRES_DONE); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 void PluginStreamUrl::DidFail() { | 105 void PluginStreamUrl::DidFail() { |
| 106 Close(NPRES_NETWORK_ERR); | 106 Close(NPRES_NETWORK_ERR); |
| 107 } | 107 } |
| 108 | 108 |
| 109 bool PluginStreamUrl::IsMultiByteResponseExpected() { |
| 110 return seekable(); |
| 111 } |
| 112 |
| 113 int PluginStreamUrl::ResourceId() { |
| 114 return id_; |
| 115 } |
| 116 |
| 109 void PluginStreamUrl::CancelRequest() { | 117 void PluginStreamUrl::CancelRequest() { |
| 110 if (id_ > 0) { | 118 if (id_ > 0) { |
| 111 if (instance()->webplugin()) { | 119 if (instance()->webplugin()) { |
| 112 instance()->webplugin()->CancelResource(id_); | 120 instance()->webplugin()->CancelResource(id_); |
| 113 } | 121 } |
| 114 id_ = 0; | 122 id_ = 0; |
| 115 } | 123 } |
| 116 } | 124 } |
| 117 | 125 |
| 118 } // namespace NPAPI | 126 } // namespace NPAPI |
| OLD | NEW |