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

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

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup 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
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/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 delay_in_msec); 169 delay_in_msec);
170 } 170 }
171 171
172 PP_Bool IsMainThread() { 172 PP_Bool IsMainThread() {
173 return BoolToPPBool(GetMainThreadMessageLoop()->BelongsToCurrentThread()); 173 return BoolToPPBool(GetMainThreadMessageLoop()->BelongsToCurrentThread());
174 } 174 }
175 175
176 const PPB_Core core_interface = { 176 const PPB_Core core_interface = {
177 &AddRefResource, 177 &AddRefResource,
178 &ReleaseResource, 178 &ReleaseResource,
179 &MemAlloc,
180 &MemFree,
181 &GetTime, 179 &GetTime,
182 &GetTickTime, 180 &GetTickTime,
183 &CallOnMainThread, 181 &CallOnMainThread,
184 &IsMainThread 182 &IsMainThread
185 }; 183 };
186 184
187 // PPB_Testing ----------------------------------------------------------------- 185 // PPB_Testing -----------------------------------------------------------------
188 186
189 PP_Bool ReadImageData(PP_Resource device_context_2d, 187 PP_Bool ReadImageData(PP_Resource device_context_2d,
190 PP_Resource image, 188 PP_Resource image,
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 DCHECK(!out_of_process_proxy_.get()); 506 DCHECK(!out_of_process_proxy_.get());
509 out_of_process_proxy_.reset(out_of_process_proxy); 507 out_of_process_proxy_.reset(out_of_process_proxy);
510 } 508 }
511 509
512 // static 510 // static
513 const PPB_Core* PluginModule::GetCore() { 511 const PPB_Core* PluginModule::GetCore() {
514 return &core_interface; 512 return &core_interface;
515 } 513 }
516 514
517 // static 515 // static
516 const PPB_Memory_Dev* PluginModule::GetMemoryDev() {
517 return static_cast<const PPB_Memory_Dev*>(PPB_Memory_Impl::GetInterface());
518 }
519
520 // static
518 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { 521 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() {
519 return &GetInterface; 522 return &GetInterface;
520 } 523 }
521 524
522 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) { 525 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) {
523 PluginInstance* instance(NULL); 526 PluginInstance* instance(NULL);
524 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5); 527 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5);
525 if (ppp_instance) { 528 if (ppp_instance) {
526 instance = PluginInstance::Create0_5(delegate, this, ppp_instance); 529 instance = PluginInstance::Create0_5(delegate, this, ppp_instance);
527 } else { 530 } else {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
615 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 618 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
616 if (retval != 0) { 619 if (retval != 0) {
617 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 620 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
618 return false; 621 return false;
619 } 622 }
620 return true; 623 return true;
621 } 624 }
622 625
623 } // namespace ppapi 626 } // namespace ppapi
624 } // namespace webkit 627 } // namespace webkit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698