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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 7466002: Reland http://codereview.chromium.org/7452002/, update chromoting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: copyright Created 9 years, 5 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 | « webkit/plugins/ppapi/event_conversion.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.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 "webkit/plugins/ppapi/plugin_module.h" 5 #include "webkit/plugins/ppapi/plugin_module.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 #include "ppapi/c/private/ppb_instance_private.h" 66 #include "ppapi/c/private/ppb_instance_private.h"
67 #include "ppapi/c/private/ppb_pdf.h" 67 #include "ppapi/c/private/ppb_pdf.h"
68 #include "ppapi/c/private/ppb_proxy_private.h" 68 #include "ppapi/c/private/ppb_proxy_private.h"
69 #include "ppapi/c/private/ppb_uma_private.h" 69 #include "ppapi/c/private/ppb_uma_private.h"
70 #include "ppapi/c/trusted/ppb_audio_trusted.h" 70 #include "ppapi/c/trusted/ppb_audio_trusted.h"
71 #include "ppapi/c/trusted/ppb_broker_trusted.h" 71 #include "ppapi/c/trusted/ppb_broker_trusted.h"
72 #include "ppapi/c/trusted/ppb_buffer_trusted.h" 72 #include "ppapi/c/trusted/ppb_buffer_trusted.h"
73 #include "ppapi/c/trusted/ppb_file_io_trusted.h" 73 #include "ppapi/c/trusted/ppb_file_io_trusted.h"
74 #include "ppapi/c/trusted/ppb_image_data_trusted.h" 74 #include "ppapi/c/trusted/ppb_image_data_trusted.h"
75 #include "ppapi/c/trusted/ppb_url_loader_trusted.h" 75 #include "ppapi/c/trusted/ppb_url_loader_trusted.h"
76 #include "ppapi/shared_impl/input_event_impl.h"
77 // TODO(dmichael): Delete this include after PPP_Instance_0_5 goes away in m14.
78 // This is just to get the PPP_INSTANCE_0_5 definition.
79 #include "ppapi/shared_impl/ppp_instance_combined.h"
76 #include "ppapi/shared_impl/time_conversion.h" 80 #include "ppapi/shared_impl/time_conversion.h"
77 #include "ppapi/thunk/enter.h" 81 #include "ppapi/thunk/enter.h"
78 #include "ppapi/thunk/thunk.h" 82 #include "ppapi/thunk/thunk.h"
79 #include "webkit/plugins/ppapi/callbacks.h" 83 #include "webkit/plugins/ppapi/callbacks.h"
80 #include "webkit/plugins/ppapi/common.h" 84 #include "webkit/plugins/ppapi/common.h"
81 #include "webkit/plugins/ppapi/ppapi_interface_factory.h" 85 #include "webkit/plugins/ppapi/ppapi_interface_factory.h"
82 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" 86 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
83 #include "webkit/plugins/ppapi/ppb_console_impl.h" 87 #include "webkit/plugins/ppapi/ppb_console_impl.h"
84 #include "webkit/plugins/ppapi/ppb_crypto_impl.h" 88 #include "webkit/plugins/ppapi/ppb_crypto_impl.h"
85 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h" 89 #include "webkit/plugins/ppapi/ppb_directory_reader_impl.h"
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 return static_cast<const PPB_Memory_Dev*>(PPB_Memory_Impl::GetInterface()); 529 return static_cast<const PPB_Memory_Dev*>(PPB_Memory_Impl::GetInterface());
526 } 530 }
527 531
528 // static 532 // static
529 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { 533 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() {
530 return &GetInterface; 534 return &GetInterface;
531 } 535 }
532 536
533 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) { 537 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) {
534 PluginInstance* instance(NULL); 538 PluginInstance* instance(NULL);
535 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5); 539 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_1_0);
536 if (ppp_instance) { 540 if (ppp_instance) {
541 instance = PluginInstance::Create1_0(delegate, this, ppp_instance);
542 } else if ((ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5))) {
543 // TODO(dmichael): Remove support for 0.5 in m14.
537 instance = PluginInstance::Create0_5(delegate, this, ppp_instance); 544 instance = PluginInstance::Create0_5(delegate, this, ppp_instance);
538 } 545 }
539 if (!instance) { 546 if (!instance) {
540 LOG(WARNING) << "Plugin doesn't support instance interface, failing."; 547 LOG(WARNING) << "Plugin doesn't support instance interface, failing.";
541 return NULL; 548 return NULL;
542 } 549 }
543 if (out_of_process_proxy_.get()) 550 if (out_of_process_proxy_.get())
544 out_of_process_proxy_->AddInstance(instance->pp_instance()); 551 out_of_process_proxy_->AddInstance(instance->pp_instance());
545 return instance; 552 return instance;
546 } 553 }
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
621 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 628 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
622 if (retval != 0) { 629 if (retval != 0) {
623 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 630 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
624 return false; 631 return false;
625 } 632 }
626 return true; 633 return true;
627 } 634 }
628 635
629 } // namespace ppapi 636 } // namespace ppapi
630 } // namespace webkit 637 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/event_conversion.cc ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698