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

Side by Side Diff: webkit/glue/plugins/pepper_resource.cc

Issue 2072010: Update Chrome to use the new int64-typedefed module, instance, and resources ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « webkit/glue/plugins/pepper_resource.h ('k') | webkit/glue/plugins/pepper_resource_tracker.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 "webkit/glue/plugins/pepper_resource.h" 5 #include "webkit/glue/plugins/pepper_resource.h"
6 6
7 #include "third_party/ppapi/c/pp_resource.h" 7 #include "third_party/ppapi/c/pp_resource.h"
8 #include "webkit/glue/plugins/pepper_resource_tracker.h" 8 #include "webkit/glue/plugins/pepper_resource_tracker.h"
9 9
10 namespace pepper { 10 namespace pepper {
11 11
12 PP_Resource NullPPResource() {
13 PP_Resource ret = { 0 };
14 return ret;
15 }
16
17 Resource::Resource(PluginModule* module) : module_(module) { 12 Resource::Resource(PluginModule* module) : module_(module) {
18 ResourceTracker::Get()->AddResource(this); 13 ResourceTracker::Get()->AddResource(this);
19 } 14 }
20 15
21 Resource::~Resource() { 16 Resource::~Resource() {
22 ResourceTracker::Get()->DeleteResource(this); 17 ResourceTracker::Get()->DeleteResource(this);
23 } 18 }
24 19
25 PP_Resource Resource::GetResource() const { 20 PP_Resource Resource::GetResource() const {
26 PP_Resource ret; 21 return reinterpret_cast<intptr_t>(this);
27 ret.id = reinterpret_cast<intptr_t>(this);
28 return ret;
29 } 22 }
30 23
31 } // namespace pepper 24 } // namespace pepper
OLDNEW
« no previous file with comments | « webkit/glue/plugins/pepper_resource.h ('k') | webkit/glue/plugins/pepper_resource_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698