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

Side by Side Diff: webkit/plugins/ppapi/plugin_module.cc

Issue 7629017: Add a unified resource tracker shared between the proxy and the impl. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Assertion fixed Created 9 years, 4 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698