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

Side by Side Diff: ppapi/cpp/module.cc

Issue 9700088: Check for specific PPB interface versions in C++ wrappers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix MouseInputEvent version check. Created 8 years, 9 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 | « ppapi/cpp/instance.cc ('k') | ppapi/cpp/rect.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) 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 // Note that the single accessor, Module::Get(), is not actually implemented 5 // Note that the single accessor, Module::Get(), is not actually implemented
6 // in this file. This is an intentional hook that allows users of ppapi's 6 // in this file. This is an intentional hook that allows users of ppapi's
7 // C++ wrapper objects to provide difference semantics for how the singleton 7 // C++ wrapper objects to provide different semantics for how the singleton
8 // object is accessed. 8 // object is accessed.
9 // 9 //
10 // In general, users of ppapi will also link in ppp_entrypoints.cc, which 10 // In general, users of ppapi will also link in ppp_entrypoints.cc, which
11 // provides a simple default implementation of Module::Get(). 11 // provides a simple default implementation of Module::Get().
12 // 12 //
13 // A notable exception where the default ppp_entrypoints will not work is 13 // A notable exception where the default ppp_entrypoints will not work is
14 // when implementing "internal plugins" that are statically linked into the 14 // when implementing "internal plugins" that are statically linked into the
15 // browser. In this case, the process may actually have multiple Modules 15 // browser. In this case, the process may actually have multiple Modules
16 // loaded at once making a traditional "singleton" unworkable. To get around 16 // loaded at once making a traditional "singleton" unworkable. To get around
17 // this, the users of ppapi need to get creative about how to properly 17 // this, the users of ppapi need to get creative about how to properly
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 const PPB_Core* core = reinterpret_cast<const PPB_Core*>(GetBrowserInterface( 210 const PPB_Core* core = reinterpret_cast<const PPB_Core*>(GetBrowserInterface(
211 PPB_CORE_INTERFACE)); 211 PPB_CORE_INTERFACE));
212 if (!core) 212 if (!core)
213 return false; 213 return false;
214 core_ = new Core(core); 214 core_ = new Core(core);
215 215
216 return Init(); 216 return Init();
217 } 217 }
218 218
219 } // namespace pp 219 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/instance.cc ('k') | ppapi/cpp/rect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698