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

Side by Side Diff: ppapi/cpp/resource.cc

Issue 9381010: Convert resources to take an instance key instead of an Instance*. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USELESS PATCH TITLE Created 8 years, 10 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
« no previous file with comments | « ppapi/cpp/resource.h ('k') | ppapi/cpp/trusted/browser_font_trusted.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "ppapi/cpp/resource.h" 5 #include "ppapi/cpp/resource.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ppapi/cpp/logging.h" 9 #include "ppapi/cpp/logging.h"
10 #include "ppapi/cpp/module.h" 10 #include "ppapi/cpp/module.h"
(...skipping 26 matching lines...) Expand all
37 PP_Resource ret = pp_resource_; 37 PP_Resource ret = pp_resource_;
38 pp_resource_ = 0; 38 pp_resource_ = 0;
39 return ret; 39 return ret;
40 } 40 }
41 41
42 Resource::Resource(PP_Resource resource) : pp_resource_(resource) { 42 Resource::Resource(PP_Resource resource) : pp_resource_(resource) {
43 if (!is_null()) 43 if (!is_null())
44 Module::Get()->core()->AddRefResource(pp_resource_); 44 Module::Get()->core()->AddRefResource(pp_resource_);
45 } 45 }
46 46
47 Resource::Resource(PassRef, PP_Resource resource) : pp_resource_(resource) {
48 }
49
47 void Resource::PassRefFromConstructor(PP_Resource resource) { 50 void Resource::PassRefFromConstructor(PP_Resource resource) {
48 PP_DCHECK(!pp_resource_); 51 PP_DCHECK(!pp_resource_);
49 pp_resource_ = resource; 52 pp_resource_ = resource;
50 } 53 }
51 54
52 } // namespace pp 55 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/resource.h ('k') | ppapi/cpp/trusted/browser_font_trusted.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698