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

Side by Side Diff: chrome/renderer/webplugin_delegate_proxy.cc

Issue 160338: Another attempt at landing this patch. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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_proxy.cc ('k') | webkit/glue/plugins/plugin_instance.cc » ('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/renderer/webplugin_delegate_proxy.h" 5 #include "chrome/renderer/webplugin_delegate_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include <atlbase.h> 10 #include <atlbase.h>
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 void WillSendRequest(const GURL& url) { 93 void WillSendRequest(const GURL& url) {
94 DCHECK(channel_ != NULL); 94 DCHECK(channel_ != NULL);
95 channel_->Send(new PluginMsg_WillSendRequest(instance_id_, resource_id_, 95 channel_->Send(new PluginMsg_WillSendRequest(instance_id_, resource_id_,
96 url)); 96 url));
97 } 97 }
98 98
99 void DidReceiveResponse(const std::string& mime_type, 99 void DidReceiveResponse(const std::string& mime_type,
100 const std::string& headers, 100 const std::string& headers,
101 uint32 expected_length, 101 uint32 expected_length,
102 uint32 last_modified, 102 uint32 last_modified,
103 bool request_is_seekable, 103 bool request_is_seekable) {
104 bool* cancel) {
105 DCHECK(channel_ != NULL); 104 DCHECK(channel_ != NULL);
106 PluginMsg_DidReceiveResponseParams params; 105 PluginMsg_DidReceiveResponseParams params;
107 params.id = resource_id_; 106 params.id = resource_id_;
108 params.mime_type = mime_type; 107 params.mime_type = mime_type;
109 params.headers = headers; 108 params.headers = headers;
110 params.expected_length = expected_length; 109 params.expected_length = expected_length;
111 params.last_modified = last_modified; 110 params.last_modified = last_modified;
112 params.request_is_seekable = request_is_seekable; 111 params.request_is_seekable = request_is_seekable;
113 // Grab a reference on the underlying channel so it does not get 112 // Grab a reference on the underlying channel so it does not get
114 // deleted from under us. 113 // deleted from under us.
115 scoped_refptr<PluginChannelHost> channel_ref(channel_); 114 scoped_refptr<PluginChannelHost> channel_ref(channel_);
116 channel_->Send(new PluginMsg_DidReceiveResponse(instance_id_, params, 115 channel_->Send(new PluginMsg_DidReceiveResponse(instance_id_, params));
117 cancel));
118 } 116 }
119 117
120 void DidReceiveData(const char* buffer, int length, int data_offset) { 118 void DidReceiveData(const char* buffer, int length, int data_offset) {
121 DCHECK(channel_ != NULL); 119 DCHECK(channel_ != NULL);
122 DCHECK(length > 0); 120 DCHECK(length > 0);
123 std::vector<char> data; 121 std::vector<char> data;
124 data.resize(static_cast<size_t>(length)); 122 data.resize(static_cast<size_t>(length));
125 memcpy(&data.front(), buffer, length); 123 memcpy(&data.front(), buffer, length);
126 // Grab a reference on the underlying channel so it does not get 124 // Grab a reference on the underlying channel so it does not get
127 // deleted from under us. 125 // deleted from under us.
(...skipping 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
965 plugin_->CancelDocumentLoad(); 963 plugin_->CancelDocumentLoad();
966 } 964 }
967 965
968 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest( 966 void WebPluginDelegateProxy::OnInitiateHTTPRangeRequest(
969 const std::string& url, const std::string& range_info, 967 const std::string& url, const std::string& range_info,
970 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) { 968 intptr_t existing_stream, bool notify_needed, intptr_t notify_data) {
971 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(), 969 plugin_->InitiateHTTPRangeRequest(url.c_str(), range_info.c_str(),
972 existing_stream, notify_needed, 970 existing_stream, notify_needed,
973 notify_data); 971 notify_data);
974 } 972 }
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.cc ('k') | webkit/glue/plugins/plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698