| 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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; | 139 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; |
| 140 } | 140 } |
| 141 } | 141 } |
| 142 | 142 |
| 143 void ReleaseResource(PP_Resource resource) { | 143 void ReleaseResource(PP_Resource resource) { |
| 144 if (!ResourceTracker::Get()->UnrefResource(resource)) { | 144 if (!ResourceTracker::Get()->UnrefResource(resource)) { |
| 145 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource " << resource; | 145 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource " << resource; |
| 146 } | 146 } |
| 147 } | 147 } |
| 148 | 148 |
| 149 void* MemAlloc(uint32_t num_bytes) { | |
| 150 return malloc(num_bytes); | |
| 151 } | |
| 152 | |
| 153 void MemFree(void* ptr) { | |
| 154 free(ptr); | |
| 155 } | |
| 156 | |
| 157 PP_Time GetTime() { | 149 PP_Time GetTime() { |
| 158 return TimeToPPTime(base::Time::Now()); | 150 return TimeToPPTime(base::Time::Now()); |
| 159 } | 151 } |
| 160 | 152 |
| 161 PP_TimeTicks GetTickTime() { | 153 PP_TimeTicks GetTickTime() { |
| 162 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); | 154 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); |
| 163 } | 155 } |
| 164 | 156 |
| 165 void CallOnMainThread(int delay_in_msec, | 157 void CallOnMainThread(int delay_in_msec, |
| 166 PP_CompletionCallback callback, | 158 PP_CompletionCallback callback, |
| (...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 594 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 586 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 595 if (retval != 0) { | 587 if (retval != 0) { |
| 596 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 588 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 597 return false; | 589 return false; |
| 598 } | 590 } |
| 599 return true; | 591 return true; |
| 600 } | 592 } |
| 601 | 593 |
| 602 } // namespace ppapi | 594 } // namespace ppapi |
| 603 } // namespace webkit | 595 } // namespace webkit |
| OLD | NEW |