| 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 | 5 |
| 6 #include "webkit/glue/plugins/plugin_stream_url.h" | 6 #include "webkit/glue/plugins/plugin_stream_url.h" |
| 7 | 7 |
| 8 #include "webkit/glue/glue_util.h" | 8 #include "webkit/glue/glue_util.h" |
| 9 #include "webkit/glue/webplugin.h" | 9 #include "webkit/glue/webplugin.h" |
| 10 #include "webkit/glue/plugins/plugin_host.h" | 10 #include "webkit/glue/plugins/plugin_host.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 void PluginStreamUrl::WillSendRequest(const GURL& url) { | 36 void PluginStreamUrl::WillSendRequest(const GURL& url) { |
| 37 url_ = url; | 37 url_ = url; |
| 38 UpdateUrl(url.spec().c_str()); | 38 UpdateUrl(url.spec().c_str()); |
| 39 } | 39 } |
| 40 | 40 |
| 41 void PluginStreamUrl::DidReceiveResponse(const std::string& mime_type, | 41 void PluginStreamUrl::DidReceiveResponse(const std::string& mime_type, |
| 42 const std::string& headers, | 42 const std::string& headers, |
| 43 uint32 expected_length, | 43 uint32 expected_length, |
| 44 uint32 last_modified, | 44 uint32 last_modified, |
| 45 bool request_is_seekable, |
| 45 bool* cancel) { | 46 bool* cancel) { |
| 46 bool opened = Open(mime_type, | 47 bool opened = Open(mime_type, |
| 47 headers, | 48 headers, |
| 48 expected_length, | 49 expected_length, |
| 49 last_modified); | 50 last_modified, |
| 51 request_is_seekable); |
| 50 if (!opened) { | 52 if (!opened) { |
| 51 instance()->RemoveStream(this); | 53 instance()->RemoveStream(this); |
| 52 *cancel = true; | 54 *cancel = true; |
| 53 } | 55 } |
| 54 } | 56 } |
| 55 | 57 |
| 56 void PluginStreamUrl::DidReceiveData(const char* buffer, int length, | 58 void PluginStreamUrl::DidReceiveData(const char* buffer, int length, |
| 57 int data_offset) { | 59 int data_offset) { |
| 58 if (!open()) | 60 if (!open()) |
| 59 return; | 61 return; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 76 if (id_ > 0) { | 78 if (id_ > 0) { |
| 77 if (instance()->webplugin()) { | 79 if (instance()->webplugin()) { |
| 78 instance()->webplugin()->CancelResource(id_); | 80 instance()->webplugin()->CancelResource(id_); |
| 79 } | 81 } |
| 80 id_ = 0; | 82 id_ = 0; |
| 81 } | 83 } |
| 82 } | 84 } |
| 83 | 85 |
| 84 } // namespace NPAPI | 86 } // namespace NPAPI |
| 85 | 87 |
| OLD | NEW |