| 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/pepper/plugin_module.h" | 5 #include "content/renderer/pepper/plugin_module.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 const PPB_Core* PluginModule::GetCore() { return &core_interface; } | 533 const PPB_Core* PluginModule::GetCore() { return &core_interface; } |
| 534 | 534 |
| 535 // static | 535 // static |
| 536 bool PluginModule::SupportsInterface(const char* name) { | 536 bool PluginModule::SupportsInterface(const char* name) { |
| 537 return !!InternalGetInterface(name); | 537 return !!InternalGetInterface(name); |
| 538 } | 538 } |
| 539 | 539 |
| 540 PepperPluginInstanceImpl* PluginModule::CreateInstance( | 540 PepperPluginInstanceImpl* PluginModule::CreateInstance( |
| 541 RenderFrameImpl* render_frame, | 541 RenderFrameImpl* render_frame, |
| 542 blink::WebPluginContainer* container, | 542 blink::WebPluginContainer* container, |
| 543 const GURL& plugin_url) { | 543 const GURL& plugin_url, |
| 544 const blink::WebURL& top_frame_url) { |
| 544 PepperPluginInstanceImpl* instance = PepperPluginInstanceImpl::Create( | 545 PepperPluginInstanceImpl* instance = PepperPluginInstanceImpl::Create( |
| 545 render_frame, this, container, plugin_url); | 546 render_frame, this, container, plugin_url, top_frame_url); |
| 546 if (!instance) { | 547 if (!instance) { |
| 547 LOG(WARNING) << "Plugin doesn't support instance interface, failing."; | 548 LOG(WARNING) << "Plugin doesn't support instance interface, failing."; |
| 548 return NULL; | 549 return NULL; |
| 549 } | 550 } |
| 550 if (host_dispatcher_wrapper_) | 551 if (host_dispatcher_wrapper_) |
| 551 host_dispatcher_wrapper_->AddInstance(instance->pp_instance()); | 552 host_dispatcher_wrapper_->AddInstance(instance->pp_instance()); |
| 552 return instance; | 553 return instance; |
| 553 } | 554 } |
| 554 | 555 |
| 555 PepperPluginInstanceImpl* PluginModule::GetSomeInstance() const { | 556 PepperPluginInstanceImpl* PluginModule::GetSomeInstance() const { |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 channel_handle, | 721 channel_handle, |
| 721 peer_pid, | 722 peer_pid, |
| 722 plugin_child_id, | 723 plugin_child_id, |
| 723 false)) // is_external = false | 724 false)) // is_external = false |
| 724 return scoped_refptr<PluginModule>(); | 725 return scoped_refptr<PluginModule>(); |
| 725 | 726 |
| 726 return module; | 727 return module; |
| 727 } | 728 } |
| 728 | 729 |
| 729 } // namespace content | 730 } // namespace content |
| OLD | NEW |