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

Side by Side Diff: webkit/plugins/ppapi/resource.h

Issue 7608033: Move the refcounting from the proxy/impl resource object to the shared resource object base class. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 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
« no previous file with comments | « ppapi/shared_impl/video_decoder_impl.cc ('k') | no next file » | 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) 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 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_RESOURCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_RESOURCE_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "ppapi/c/pp_resource.h" 9 #include "ppapi/c/pp_resource.h"
11 #include "ppapi/shared_impl/resource_object_base.h" 10 #include "ppapi/shared_impl/resource_object_base.h"
12 #include "webkit/plugins/ppapi/resource_tracker.h" 11 #include "webkit/plugins/ppapi/resource_tracker.h"
13 12
14 namespace webkit { 13 namespace webkit {
15 namespace ppapi { 14 namespace ppapi {
16 15
17 class Resource : public base::RefCountedThreadSafe<Resource>, 16 class Resource : public ::ppapi::ResourceObjectBase {
18 public ::ppapi::ResourceObjectBase {
19 public: 17 public:
20 explicit Resource(PluginInstance* instance); 18 explicit Resource(PluginInstance* instance);
21 virtual ~Resource(); 19 virtual ~Resource();
22 20
23 // Returns the instance owning this resource. This is generally to be 21 // Returns the instance owning this resource. This is generally to be
24 // non-NULL except if the instance is destroyed and some code internal to the 22 // non-NULL except if the instance is destroyed and some code internal to the
25 // PPAPI implementation is keeping a reference for some reason. 23 // PPAPI implementation is keeping a reference for some reason.
26 PluginInstance* instance() const { return instance_; } 24 PluginInstance* instance() const { return instance_; }
27 25
28 // Clears the instance pointer when the associated PluginInstance will be 26 // Clears the instance pointer when the associated PluginInstance will be
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Non-owning pointer to our instance. See getter above. 82 // Non-owning pointer to our instance. See getter above.
85 PluginInstance* instance_; 83 PluginInstance* instance_;
86 84
87 DISALLOW_COPY_AND_ASSIGN(Resource); 85 DISALLOW_COPY_AND_ASSIGN(Resource);
88 }; 86 };
89 87
90 } // namespace ppapi 88 } // namespace ppapi
91 } // namespace webkit 89 } // namespace webkit
92 90
93 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_H_ 91 #endif // WEBKIT_PLUGINS_PPAPI_RESOURCE_H_
OLDNEW
« no previous file with comments | « ppapi/shared_impl/video_decoder_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698