Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(632)

Side by Side Diff: chrome/plugin/webplugin_delegate_stub.cc

Issue 2896: This CB fixes the following issues:-... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/time.h" 8 #include "base/time.h"
9 #include "base/gfx/bitmap_header.h" 9 #include "base/gfx/bitmap_header.h"
10 #include "base/gfx/platform_device_win.h" 10 #include "base/gfx/platform_device_win.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 return; 156 return;
157 157
158 client->DidReceiveResponse(params.mime_type, 158 client->DidReceiveResponse(params.mime_type,
159 params.headers, 159 params.headers,
160 params.expected_length, 160 params.expected_length,
161 params.last_modified, 161 params.last_modified,
162 cancel); 162 cancel);
163 } 163 }
164 164
165 void WebPluginDelegateStub::OnDidReceiveData(int id, 165 void WebPluginDelegateStub::OnDidReceiveData(int id,
166 const std::vector<char>& buffer) { 166 const std::vector<char>& buffer,
167 int data_offset) {
167 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); 168 WebPluginResourceClient* client = webplugin_->GetResourceClient(id);
168 if (!client) 169 if (!client)
169 return; 170 return;
170 171
171 client->DidReceiveData(&buffer.front(), static_cast<int>(buffer.size())); 172 client->DidReceiveData(&buffer.front(), static_cast<int>(buffer.size()),
173 data_offset);
172 } 174 }
173 175
174 void WebPluginDelegateStub::OnDidFinishLoading(int id) { 176 void WebPluginDelegateStub::OnDidFinishLoading(int id) {
175 WebPluginResourceClient* client = webplugin_->GetResourceClient(id); 177 WebPluginResourceClient* client = webplugin_->GetResourceClient(id);
176 if (!client) 178 if (!client)
177 return; 179 return;
178 180
179 client->DidFinishLoading(); 181 client->DidFinishLoading();
180 } 182 }
181 183
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 // If the calling function's shared_buf is on the stack, its destructor will 421 // If the calling function's shared_buf is on the stack, its destructor will
420 // close the shared memory buffer handle. This is fine since we already 422 // close the shared memory buffer handle. This is fine since we already
421 // duplicated the handle to the renderer process so it will stay "alive". 423 // duplicated the handle to the renderer process so it will stay "alive".
422 } 424 }
423 425
424 void WebPluginDelegateStub::OnHandleURLRequestReply( 426 void WebPluginDelegateStub::OnHandleURLRequestReply(
425 const PluginMsg_URLRequestReply_Params& params) { 427 const PluginMsg_URLRequestReply_Params& params) {
426 WebPluginResourceClient* resource_client = 428 WebPluginResourceClient* resource_client =
427 delegate_->CreateResourceClient(params.resource_id, params.url, 429 delegate_->CreateResourceClient(params.resource_id, params.url,
428 params.notify_needed, 430 params.notify_needed,
429 params.notify_data); 431 params.notify_data,
432 params.stream);
430 webplugin_->OnResourceCreated(params.resource_id, resource_client); 433 webplugin_->OnResourceCreated(params.resource_id, resource_client);
431 } 434 }
432 435
433 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url, 436 void WebPluginDelegateStub::OnURLRequestRouted(const std::string& url,
434 bool notify_needed, 437 bool notify_needed,
435 HANDLE notify_data) { 438 HANDLE notify_data) {
436 delegate_->URLRequestRouted(url, notify_needed, notify_data); 439 delegate_->URLRequestRouted(url, notify_needed, notify_data);
437 } 440 }
438 441
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_delegate_stub.h ('k') | chrome/plugin/webplugin_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698