| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_GTK) | 7 #if defined(TOOLKIT_GTK) |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 #elif defined(USE_X11) | 9 #elif defined(USE_X11) |
| 10 #include <cairo/cairo.h> | 10 #include <cairo/cairo.h> |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 // The stub will delete itself when the proxy tells it that it's released, or | 983 // The stub will delete itself when the proxy tells it that it's released, or |
| 984 // otherwise when the channel is closed. | 984 // otherwise when the channel is closed. |
| 985 window_script_object_ = (new NPObjectStub( | 985 window_script_object_ = (new NPObjectStub( |
| 986 npobject, channel_host_.get(), route_id, 0, page_url_))->AsWeakPtr(); | 986 npobject, channel_host_.get(), route_id, 0, page_url_))->AsWeakPtr(); |
| 987 *success = true; | 987 *success = true; |
| 988 } | 988 } |
| 989 | 989 |
| 990 void WebPluginDelegateProxy::OnResolveProxy(const GURL& url, | 990 void WebPluginDelegateProxy::OnResolveProxy(const GURL& url, |
| 991 bool* result, | 991 bool* result, |
| 992 std::string* proxy_list) { | 992 std::string* proxy_list) { |
| 993 *result = false; | 993 *result = RenderThreadImpl::current()->ResolveProxy(url, proxy_list); |
| 994 RenderThreadImpl::current()->Send( | |
| 995 new ViewHostMsg_ResolveProxy(url, result, proxy_list)); | |
| 996 } | 994 } |
| 997 | 995 |
| 998 void WebPluginDelegateProxy::OnGetPluginElement(int route_id, bool* success) { | 996 void WebPluginDelegateProxy::OnGetPluginElement(int route_id, bool* success) { |
| 999 *success = false; | 997 *success = false; |
| 1000 NPObject* npobject = NULL; | 998 NPObject* npobject = NULL; |
| 1001 if (plugin_) | 999 if (plugin_) |
| 1002 npobject = plugin_->GetPluginElement(); | 1000 npobject = plugin_->GetPluginElement(); |
| 1003 if (!npobject) | 1001 if (!npobject) |
| 1004 return; | 1002 return; |
| 1005 | 1003 |
| (...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1301 | 1299 |
| 1302 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1300 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
| 1303 int resource_id) { | 1301 int resource_id) { |
| 1304 if (!plugin_) | 1302 if (!plugin_) |
| 1305 return; | 1303 return; |
| 1306 | 1304 |
| 1307 plugin_->URLRedirectResponse(allow, resource_id); | 1305 plugin_->URLRedirectResponse(allow, resource_id); |
| 1308 } | 1306 } |
| 1309 | 1307 |
| 1310 } // namespace content | 1308 } // namespace content |
| OLD | NEW |