| 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 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 base::MessageLoopProxy* GetMainThreadMessageLoop() { | 132 base::MessageLoopProxy* GetMainThreadMessageLoop() { |
| 133 static scoped_refptr<base::MessageLoopProxy> proxy( | 133 static scoped_refptr<base::MessageLoopProxy> proxy( |
| 134 base::MessageLoopProxy::current()); | 134 base::MessageLoopProxy::current()); |
| 135 return proxy.get(); | 135 return proxy.get(); |
| 136 } | 136 } |
| 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 ResourceTracker::Get()->AddRefResource(resource); |
| 142 DLOG(WARNING) << "AddRefResource()ing a nonexistent resource " << resource; | |
| 143 } | |
| 144 } | 142 } |
| 145 | 143 |
| 146 void ReleaseResource(PP_Resource resource) { | 144 void ReleaseResource(PP_Resource resource) { |
| 147 if (!ResourceTracker::Get()->UnrefResource(resource)) { | 145 ResourceTracker::Get()->ReleaseResource(resource); |
| 148 DLOG(WARNING) << "ReleaseResource()ing a nonexistent resource " << resource; | |
| 149 } | |
| 150 } | 146 } |
| 151 | 147 |
| 152 PP_Time GetTime() { | 148 PP_Time GetTime() { |
| 153 return TimeToPPTime(base::Time::Now()); | 149 return TimeToPPTime(base::Time::Now()); |
| 154 } | 150 } |
| 155 | 151 |
| 156 PP_TimeTicks GetTickTime() { | 152 PP_TimeTicks GetTickTime() { |
| 157 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); | 153 return TimeTicksToPPTimeTicks(base::TimeTicks::Now()); |
| 158 } | 154 } |
| 159 | 155 |
| (...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 int retval = entry_points.initialize_module(pp_module(), &GetInterface); | 591 int retval = entry_points.initialize_module(pp_module(), &GetInterface); |
| 596 if (retval != 0) { | 592 if (retval != 0) { |
| 597 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; | 593 LOG(WARNING) << "PPP_InitializeModule returned failure " << retval; |
| 598 return false; | 594 return false; |
| 599 } | 595 } |
| 600 return true; | 596 return true; |
| 601 } | 597 } |
| 602 | 598 |
| 603 } // namespace ppapi | 599 } // namespace ppapi |
| 604 } // namespace webkit | 600 } // namespace webkit |
| OLD | NEW |