| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 PepperPluginInfo::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { | 525 PepperPluginInfo::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { |
| 526 return &GetInterface; | 526 return &GetInterface; |
| 527 } | 527 } |
| 528 | 528 |
| 529 // static | 529 // static |
| 530 bool PluginModule::SupportsInterface(const char* name) { | 530 bool PluginModule::SupportsInterface(const char* name) { |
| 531 return !!InternalGetInterface(name); | 531 return !!InternalGetInterface(name); |
| 532 } | 532 } |
| 533 | 533 |
| 534 PepperPluginInstanceImpl* PluginModule::CreateInstance( | 534 PepperPluginInstanceImpl* PluginModule::CreateInstance( |
| 535 PluginDelegate* delegate, | 535 PepperPluginDelegateImpl* delegate, |
| 536 RenderViewImpl* render_view, | 536 RenderViewImpl* render_view, |
| 537 WebKit::WebPluginContainer* container, | 537 WebKit::WebPluginContainer* container, |
| 538 const GURL& plugin_url) { | 538 const GURL& plugin_url) { |
| 539 PepperPluginInstanceImpl* instance = PepperPluginInstanceImpl::Create( | 539 PepperPluginInstanceImpl* instance = PepperPluginInstanceImpl::Create( |
| 540 delegate, render_view, this, container, plugin_url); | 540 delegate, render_view, this, container, plugin_url); |
| 541 if (!instance) { | 541 if (!instance) { |
| 542 LOG(WARNING) << "Plugin doesn't support instance interface, failing."; | 542 LOG(WARNING) << "Plugin doesn't support instance interface, failing."; |
| 543 return NULL; | 543 return NULL; |
| 544 } | 544 } |
| 545 if (host_dispatcher_wrapper_) | 545 if (host_dispatcher_wrapper_) |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 623 DCHECK(entry_points.initialize_module != NULL); | 623 DCHECK(entry_points.initialize_module != NULL); |
| 624 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 624 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 625 if (retval != 0) { | 625 if (retval != 0) { |
| 626 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 626 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 627 return false; | 627 return false; |
| 628 } | 628 } |
| 629 return true; | 629 return true; |
| 630 } | 630 } |
| 631 | 631 |
| 632 } // namespace content | 632 } // namespace content |
| OLD | NEW |