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

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

Issue 7791005: Stop using the default profile's proxy service for plugin proxy requests, and instead use the ass... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix test Created 9 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 | « content/renderer/webplugin_delegate_proxy.h ('k') | webkit/glue/webkit_glue.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/webplugin_delegate_proxy.h" 5 #include "content/renderer/webplugin_delegate_proxy.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 #if defined(OS_WIN) 426 #if defined(OS_WIN)
427 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent, 427 IPC_MESSAGE_HANDLER(PluginHostMsg_SetWindowlessPumpEvent,
428 OnSetWindowlessPumpEvent) 428 OnSetWindowlessPumpEvent)
429 #endif 429 #endif
430 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource) 430 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelResource, OnCancelResource)
431 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect) 431 IPC_MESSAGE_HANDLER(PluginHostMsg_InvalidateRect, OnInvalidateRect)
432 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject, 432 IPC_MESSAGE_HANDLER(PluginHostMsg_GetWindowScriptNPObject,
433 OnGetWindowScriptNPObject) 433 OnGetWindowScriptNPObject)
434 IPC_MESSAGE_HANDLER(PluginHostMsg_GetPluginElement, 434 IPC_MESSAGE_HANDLER(PluginHostMsg_GetPluginElement,
435 OnGetPluginElement) 435 OnGetPluginElement)
436 IPC_MESSAGE_HANDLER(PluginHostMsg_ResolveProxy, OnResolveProxy)
436 IPC_MESSAGE_HANDLER(PluginHostMsg_SetCookie, OnSetCookie) 437 IPC_MESSAGE_HANDLER(PluginHostMsg_SetCookie, OnSetCookie)
437 IPC_MESSAGE_HANDLER(PluginHostMsg_GetCookies, OnGetCookies) 438 IPC_MESSAGE_HANDLER(PluginHostMsg_GetCookies, OnGetCookies)
438 IPC_MESSAGE_HANDLER(PluginHostMsg_MissingPluginStatus, 439 IPC_MESSAGE_HANDLER(PluginHostMsg_MissingPluginStatus,
439 OnMissingPluginStatus) 440 OnMissingPluginStatus)
440 IPC_MESSAGE_HANDLER(PluginHostMsg_URLRequest, OnHandleURLRequest) 441 IPC_MESSAGE_HANDLER(PluginHostMsg_URLRequest, OnHandleURLRequest)
441 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelDocumentLoad, OnCancelDocumentLoad) 442 IPC_MESSAGE_HANDLER(PluginHostMsg_CancelDocumentLoad, OnCancelDocumentLoad)
442 IPC_MESSAGE_HANDLER(PluginHostMsg_InitiateHTTPRangeRequest, 443 IPC_MESSAGE_HANDLER(PluginHostMsg_InitiateHTTPRangeRequest,
443 OnInitiateHTTPRangeRequest) 444 OnInitiateHTTPRangeRequest)
444 IPC_MESSAGE_HANDLER(PluginHostMsg_DeferResourceLoading, 445 IPC_MESSAGE_HANDLER(PluginHostMsg_DeferResourceLoading,
445 OnDeferResourceLoading) 446 OnDeferResourceLoading)
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 if (!npobject) 1093 if (!npobject)
1093 return; 1094 return;
1094 1095
1095 // The stub will delete itself when the proxy tells it that it's released, or 1096 // The stub will delete itself when the proxy tells it that it's released, or
1096 // otherwise when the channel is closed. 1097 // otherwise when the channel is closed.
1097 window_script_object_ = (new NPObjectStub( 1098 window_script_object_ = (new NPObjectStub(
1098 npobject, channel_host_.get(), route_id, 0, page_url_))->AsWeakPtr(); 1099 npobject, channel_host_.get(), route_id, 0, page_url_))->AsWeakPtr();
1099 *success = true; 1100 *success = true;
1100 } 1101 }
1101 1102
1103 void WebPluginDelegateProxy::OnResolveProxy(const GURL& url,
1104 bool* result,
1105 std::string* proxy_list) {
1106 *result = false;
1107 RenderThread::current()->Send(
1108 new ViewHostMsg_ResolveProxy(url, result, proxy_list));
1109 }
1110
1102 void WebPluginDelegateProxy::OnGetPluginElement(int route_id, bool* success) { 1111 void WebPluginDelegateProxy::OnGetPluginElement(int route_id, bool* success) {
1103 *success = false; 1112 *success = false;
1104 NPObject* npobject = NULL; 1113 NPObject* npobject = NULL;
1105 if (plugin_) 1114 if (plugin_)
1106 npobject = plugin_->GetPluginElement(); 1115 npobject = plugin_->GetPluginElement();
1107 if (!npobject) 1116 if (!npobject)
1108 return; 1117 return;
1109 1118
1110 // The stub will delete itself when the proxy tells it that it's released, or 1119 // The stub will delete itself when the proxy tells it that it's released, or
1111 // otherwise when the channel is closed. 1120 // otherwise when the channel is closed.
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
1390 } 1399 }
1391 #endif 1400 #endif
1392 1401
1393 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, 1402 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow,
1394 int resource_id) { 1403 int resource_id) {
1395 if (!plugin_) 1404 if (!plugin_)
1396 return; 1405 return;
1397 1406
1398 plugin_->URLRedirectResponse(allow, resource_id); 1407 plugin_->URLRedirectResponse(allow, resource_id);
1399 } 1408 }
OLDNEW
« no previous file with comments | « content/renderer/webplugin_delegate_proxy.h ('k') | webkit/glue/webkit_glue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698