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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 137 |
138 // PPB_Core -------------------------------------------------------------------- | 138 // PPB_Core -------------------------------------------------------------------- |
139 | 139 |
140 void AddRefResource(PP_Resource resource) { | 140 void AddRefResource(PP_Resource resource) { |
141 if (!ResourceTracker::Get()->AddRefResource(resource)) { | 141 if (!ResourceTracker::Get()->AddRefResource(resource)) { |
142 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; | 142 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; |
143 } | 143 } |
144 } | 144 } |
145 | 145 |
146 void ReleaseResource(PP_Resource resource) { | 146 void ReleaseResource(PP_Resource resource) { |
147 if (!ResourceTracker::Get()->UnrefResource(resource)) { | 147 if (!ResourceTracker::Get()->ReleaseResource(resource)) { |
148 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource " << resource; | 148 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource " << resource; |
149 } | 149 } |
150 } | 150 } |
151 | 151 |
152 PP_Time GetTime() { | 152 PP_Time GetTime() { |
153 return TimeToPPTime(base::Time::Now()); | 153 return TimeToPPTime(base::Time::Now()); |
154 } | 154 } |
155 | 155 |
156 PP_TimeTicks GetTickTime() { | 156 PP_TimeTicks GetTickTime() { |
157 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); | 157 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
595 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 595 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
596 if (retval != 0) { | 596 if (retval != 0) { |
597 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 597 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
598 return false; | 598 return false; |
599 } | 599 } |
600 return true; | 600 return true; |
601 } | 601 } |
602 | 602 |
603 } // namespace ppapi | 603 } // namespace ppapi |
604 } // namespace webkit | 604 } // namespace webkit |
OLD | NEW |