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

Side by Side Diff: ppapi/cpp/core.h

Issue 6711047: Fix up some types in the API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: static_cast and header order Created 9 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/c/private/ppb_flash_net_connector.h ('k') | ppapi/cpp/url_loader.h » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #ifndef PPAPI_CPP_CORE_H_ 5 #ifndef PPAPI_CPP_CORE_H_
6 #define PPAPI_CPP_CORE_H_ 6 #define PPAPI_CPP_CORE_H_
7 7
8 #include "ppapi/c/ppb_core.h" 8 #include "ppapi/c/ppb_core.h"
9 9
10 namespace pp { 10 namespace pp {
11 11
12 class CompletionCallback; 12 class CompletionCallback;
13 class Module; 13 class Module;
14 14
15 // Simple wrapper around the PPB_Core interface. Some of these wrappers add 15 // Simple wrapper around the PPB_Core interface. Some of these wrappers add
16 // nothing over the C interface, but some allow the use of C++ arguments. 16 // nothing over the C interface, but some allow the use of C++ arguments.
17 class Core { 17 class Core {
18 public: 18 public:
19 // Note that we explicitly don't expose Resource& versions of this function 19 // Note that we explicitly don't expose Resource& versions of this function
20 // since Resource will normally manage the refcount properly. These should 20 // since Resource will normally manage the refcount properly. These should
21 // be called only when doing manual management on raw PP_Resource handles, 21 // be called only when doing manual management on raw PP_Resource handles,
22 // which should be fairly rare. 22 // which should be fairly rare.
23 void AddRefResource(PP_Resource resource) { 23 void AddRefResource(PP_Resource resource) {
24 interface_->AddRefResource(resource); 24 interface_->AddRefResource(resource);
25 } 25 }
26 void ReleaseResource(PP_Resource resource) { 26 void ReleaseResource(PP_Resource resource) {
27 interface_->ReleaseResource(resource); 27 interface_->ReleaseResource(resource);
28 } 28 }
29 29
30 void* MemAlloc(size_t num_bytes) { 30 void* MemAlloc(uint32_t num_bytes) {
31 return interface_->MemAlloc(num_bytes); 31 return interface_->MemAlloc(num_bytes);
32 } 32 }
33 void MemFree(void* ptr) { 33 void MemFree(void* ptr) {
34 interface_->MemFree(ptr); 34 interface_->MemFree(ptr);
35 } 35 }
36 36
37 PP_Time GetTime() { 37 PP_Time GetTime() {
38 return interface_->GetTime(); 38 return interface_->GetTime();
39 } 39 }
40 40
(...skipping 17 matching lines...) Expand all
58 // Copy and assignment are disallowed. 58 // Copy and assignment are disallowed.
59 Core(const Core& other); 59 Core(const Core& other);
60 Core& operator=(const Core& other); 60 Core& operator=(const Core& other);
61 61
62 const PPB_Core* interface_; 62 const PPB_Core* interface_;
63 }; 63 };
64 64
65 } // namespace pp 65 } // namespace pp
66 66
67 #endif // PPAPI_CPP_CORE_H_ 67 #endif // PPAPI_CPP_CORE_H_
OLDNEW
« no previous file with comments | « ppapi/c/private/ppb_flash_net_connector.h ('k') | ppapi/cpp/url_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698