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

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

Issue 11490014: PPAPI: Make Messaging not PostTask and copy when out-of-process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years 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
OLDNEW
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 "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/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 // module, and one or more instances are added later. In this case, the 511 // module, and one or more instances are added later. In this case, the
512 // PluginInstance was already created as in-process, so we missed the proxy 512 // PluginInstance was already created as in-process, so we missed the proxy
513 // AddInstance step and must do it now. 513 // AddInstance step and must do it now.
514 out_of_process_proxy_->AddInstance(plugin_instance->pp_instance()); 514 out_of_process_proxy_->AddInstance(plugin_instance->pp_instance());
515 // In NaCl, we need to tell the instance to reset itself as proxied. This will 515 // In NaCl, we need to tell the instance to reset itself as proxied. This will
516 // clear cached interface pointers and send DidCreate (etc) to the plugin 516 // clear cached interface pointers and send DidCreate (etc) to the plugin
517 // side of the proxy. 517 // side of the proxy.
518 return plugin_instance->ResetAsProxied(this); 518 return plugin_instance->ResetAsProxied(this);
519 } 519 }
520 520
521 bool PluginModule::IsProxied() const {
522 return !!out_of_process_proxy_;
523 }
524
521 // static 525 // static
522 const PPB_Core* PluginModule::GetCore() { 526 const PPB_Core* PluginModule::GetCore() {
523 return &core_interface; 527 return &core_interface;
524 } 528 }
525 529
526 // static 530 // static
527 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { 531 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() {
528 return &GetInterface; 532 return &GetInterface;
529 } 533 }
530 534
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 619 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
616 if (retval != 0) { 620 if (retval != 0) {
617 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 621 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
618 return false; 622 return false;
619 } 623 }
620 return true; 624 return true;
621 } 625 }
622 626
623 } // namespace ppapi 627 } // namespace ppapi
624 } // namespace webkit 628 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698