OLD | NEW |
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 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 #endif | 276 #endif |
277 | 277 |
278 bool WebPluginDelegateProxy::Initialize( | 278 bool WebPluginDelegateProxy::Initialize( |
279 const GURL& url, | 279 const GURL& url, |
280 const std::vector<std::string>& arg_names, | 280 const std::vector<std::string>& arg_names, |
281 const std::vector<std::string>& arg_values, | 281 const std::vector<std::string>& arg_values, |
282 webkit::npapi::WebPlugin* plugin, | 282 webkit::npapi::WebPlugin* plugin, |
283 bool load_manually) { | 283 bool load_manually) { |
284 IPC::ChannelHandle channel_handle; | 284 IPC::ChannelHandle channel_handle; |
285 if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin( | 285 if (!RenderThread::current()->Send(new ViewHostMsg_OpenChannelToPlugin( |
286 render_view_->routing_id(), url, mime_type_, &channel_handle, | 286 render_view_->routing_id(), url, page_url_, mime_type_, |
287 &info_))) { | 287 &channel_handle, &info_))) { |
288 return false; | 288 return false; |
289 } | 289 } |
290 | 290 |
291 if (channel_handle.name.empty()) { | 291 if (channel_handle.name.empty()) { |
292 // We got an invalid handle. Either the plugin couldn't be found (which | 292 // We got an invalid handle. Either the plugin couldn't be found (which |
293 // shouldn't happen, since if we got here the plugin should exist) or the | 293 // shouldn't happen, since if we got here the plugin should exist) or the |
294 // plugin crashed on initialization. | 294 // plugin crashed on initialization. |
295 if (!info_.path.empty()) { | 295 if (!info_.path.empty()) { |
296 render_view_->PluginCrashed(info_.path); | 296 render_view_->PluginCrashed(info_.path); |
297 | 297 |
(...skipping 1092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1390 } | 1390 } |
1391 #endif | 1391 #endif |
1392 | 1392 |
1393 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, | 1393 void WebPluginDelegateProxy::OnURLRedirectResponse(bool allow, |
1394 int resource_id) { | 1394 int resource_id) { |
1395 if (!plugin_) | 1395 if (!plugin_) |
1396 return; | 1396 return; |
1397 | 1397 |
1398 plugin_->URLRedirectResponse(allow, resource_id); | 1398 plugin_->URLRedirectResponse(allow, resource_id); |
1399 } | 1399 } |
OLD | NEW |