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

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: Changes based on comments from dmichael 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/plugin_module.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('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/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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 DCHECK(!out_of_process_proxy_.get()); 540 DCHECK(!out_of_process_proxy_.get());
543 out_of_process_proxy_.reset(out_of_process_proxy); 541 out_of_process_proxy_.reset(out_of_process_proxy);
544 } 542 }
545 543
546 // static 544 // static
547 const PPB_Core* PluginModule::GetCore() { 545 const PPB_Core* PluginModule::GetCore() {
548 return &core_interface; 546 return &core_interface;
549 } 547 }
550 548
551 // static 549 // static
550 const PPB_Memory_Dev* PluginModule::GetMemoryDev() {
551 return static_cast<const PPB_Memory_Dev*>(PPB_Memory_Impl::GetInterface());
552 }
553
554 // static
552 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() { 555 PluginModule::GetInterfaceFunc PluginModule::GetLocalGetInterfaceFunc() {
553 return &GetInterface; 556 return &GetInterface;
554 } 557 }
555 558
556 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) { 559 PluginInstance* PluginModule::CreateInstance(PluginDelegate* delegate) {
557 PluginInstance* instance(NULL); 560 PluginInstance* instance(NULL);
558 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5); 561 const void* ppp_instance = GetPluginInterface(PPP_INSTANCE_INTERFACE_0_5);
559 if (ppp_instance) { 562 if (ppp_instance) {
560 instance = PluginInstance::Create0_5(delegate, this, ppp_instance); 563 instance = PluginInstance::Create0_5(delegate, this, ppp_instance);
561 } else { 564 } else {
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
649 int retval = entry_points.initialize_module(pp_module(), &GetInterface); 652 int retval = entry_points.initialize_module(pp_module(), &GetInterface);
650 if (retval != 0) { 653 if (retval != 0) {
651 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; 654 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval;
652 return false; 655 return false;
653 } 656 }
654 return true; 657 return true;
655 } 658 }
656 659
657 } // namespace ppapi 660 } // namespace ppapi
658 } // namespace webkit 661 } // namespace webkit
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/plugin_module.h ('k') | webkit/plugins/ppapi/ppapi_plugin_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698