| 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 "chrome/plugin/webplugin_delegate_stub.h" | 5 #include "chrome/plugin/webplugin_delegate_stub.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "chrome/common/child_process_logging.h" | 10 #include "chrome/common/child_process_logging.h" |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 166 |
| 167 void WebPluginDelegateStub::OnWillSendRequest(int id, const GURL& url) { | 167 void WebPluginDelegateStub::OnWillSendRequest(int id, const GURL& url) { |
| 168 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); | 168 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); |
| 169 if (!client) | 169 if (!client) |
| 170 return; | 170 return; |
| 171 | 171 |
| 172 client->WillSendRequest(url); | 172 client->WillSendRequest(url); |
| 173 } | 173 } |
| 174 | 174 |
| 175 void WebPluginDelegateStub::OnDidReceiveResponse( | 175 void WebPluginDelegateStub::OnDidReceiveResponse( |
| 176 const PluginMsg_DidReceiveResponseParams& params, bool* cancel) { | 176 const PluginMsg_DidReceiveResponseParams& params) { |
| 177 *cancel = false; | |
| 178 WebPluginResourceClient* client = webplugin_->GetResourceClient(params.id); | 177 WebPluginResourceClient* client = webplugin_->GetResourceClient(params.id); |
| 179 if (!client) | 178 if (!client) |
| 180 return; | 179 return; |
| 181 | 180 |
| 182 client->DidReceiveResponse(params.mime_type, | 181 client->DidReceiveResponse(params.mime_type, |
| 183 params.headers, | 182 params.headers, |
| 184 params.expected_length, | 183 params.expected_length, |
| 185 params.last_modified, | 184 params.last_modified, |
| 186 params.request_is_seekable, | 185 params.request_is_seekable); |
| 187 cancel); | |
| 188 } | 186 } |
| 189 | 187 |
| 190 void WebPluginDelegateStub::OnDidReceiveData(int id, | 188 void WebPluginDelegateStub::OnDidReceiveData(int id, |
| 191 const std::vector<char>& buffer, | 189 const std::vector<char>& buffer, |
| 192 int data_offset) { | 190 int data_offset) { |
| 193 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); | 191 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); |
| 194 if (!client) | 192 if (!client) |
| 195 return; | 193 return; |
| 196 | 194 |
| 197 client->DidReceiveData(&buffer.front(), static_cast<int>(buffer.size()), | 195 client->DidReceiveData(&buffer.front(), static_cast<int>(buffer.size()), |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 373 params.notify_data, | 371 params.notify_data, |
| 374 params.stream); | 372 params.stream); |
| 375 webplugin_->OnResourceCreated(params.resource_id, resource_client); | 373 webplugin_->OnResourceCreated(params.resource_id, resource_client); |
| 376 } | 374 } |
| 377 | 375 |
| 378 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, | 376 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, |
| 379 bool notify_needed, | 377 bool notify_needed, |
| 380 intptr_t notify_data) { | 378 intptr_t notify_data) { |
| 381 delegate_->URLRequestRouted(url, notify_needed, notify_data); | 379 delegate_->URLRequestRouted(url, notify_needed, notify_data); |
| 382 } | 380 } |
| OLD | NEW |