OLD | NEW |
---|---|
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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
131 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource"; | 131 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource"; |
132 } | 132 } |
133 } | 133 } |
134 | 134 |
135 void ReleaseResource(PP_Resource resource) { | 135 void ReleaseResource(PP_Resource resource) { |
136 if (!ResourceTracker::Get()->UnrefResource(resource)) { | 136 if (!ResourceTracker::Get()->UnrefResource(resource)) { |
137 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource"; | 137 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource"; |
138 } | 138 } |
139 } | 139 } |
140 | 140 |
141 void* MemAlloc(size_t num_bytes) { | 141 void* MemAlloc(uint32_t num_bytes) { |
142 return malloc(num_bytes); | 142 return malloc(num_bytes); |
143 } | 143 } |
144 | 144 |
145 void MemFree(void* ptr) { | 145 void MemFree(const void* ptr) { |
146 free(ptr); | 146 free(const_cast<void*>(ptr)); |
dmichael(do not use this one)
2011/03/21 22:26:58
I think you want to take const off here, too.
neb
2011/03/21 23:22:25
Nice catch, I spaced out a bit.
I've removed it a
| |
147 } | 147 } |
148 | 148 |
149 double GetTime() { | 149 double GetTime() { |
150 return base::Time::Now().ToDoubleT(); | 150 return base::Time::Now().ToDoubleT(); |
151 } | 151 } |
152 | 152 |
153 double GetTickTime() { | 153 double GetTickTime() { |
154 // TODO(brettw) http://code.google.com/p/chromium/issues/detail?id=57448 | 154 // TODO(brettw) http://code.google.com/p/chromium/issues/detail?id=57448 |
155 // This should be a tick timer rather than wall clock time, but needs to | 155 // This should be a tick timer rather than wall clock time, but needs to |
156 // match message times, which also currently use wall clock time. | 156 // match message times, which also currently use wall clock time. |
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
530 if (retval != 0) { | 530 if (retval != 0) { |
531 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 531 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
532 return false; | 532 return false; |
533 } | 533 } |
534 return true; | 534 return true; |
535 } | 535 } |
536 | 536 |
537 } // namespace ppapi | 537 } // namespace ppapi |
538 } // namespace webkit | 538 } // namespace webkit |
539 | 539 |
OLD | NEW |