OLD | NEW |
| (Empty) |
1 // Copyright 2010 The Ginsu Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can | |
3 // be found in the LICENSE file. | |
4 | |
5 #include <assert.h> | |
6 #include <nacl/npapi_extensions.h> | |
7 #include <nacl/npupp.h> | |
8 | |
9 // PINPAPI extensions. These get filled in when NPP_New is called. | |
10 static NPExtensions* kPINPAPIExtensions = NULL; | |
11 | |
12 void InitializePepperExtensions(NPP instance) { | |
13 // Grab the PINPAPI extensions. | |
14 NPN_GetValue(instance, NPNVPepperExtensions, | |
15 reinterpret_cast<void*>(&kPINPAPIExtensions)); | |
16 assert(NULL != kPINPAPIExtensions); | |
17 } | |
18 | |
19 // These are PINPAPI extensions. | |
20 NPDevice* NPN_AcquireDevice(NPP instance, NPDeviceID device) { | |
21 return kPINPAPIExtensions ? | |
22 kPINPAPIExtensions->acquireDevice(instance, device) : NULL; | |
23 } | |
24 | |
OLD | NEW |