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

Side by Side Diff: ppapi/shared_impl/resource_var.cc

Issue 24196005: [PPAPI] ResourceVar now holds a pending renderer and browser host ID. (Closed) Base URL: http://git.chromium.org/chromium/src.git@pepper-resourcerawvardata
Patch Set: Remove unnecessary static_cast. Created 7 years, 2 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
« no previous file with comments | « ppapi/shared_impl/resource_var.h ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/shared_impl/resource_var.h" 5 #include "ppapi/shared_impl/resource_var.h"
6 6
7 #include "ppapi/shared_impl/ppapi_globals.h" 7 #include "ppapi/shared_impl/ppapi_globals.h"
8 #include "ppapi/shared_impl/var_tracker.h" 8 #include "ppapi/shared_impl/var_tracker.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
11 11
12 int ResourceVar::GetPendingRendererHostId() const {
13 return 0;
14 }
15
16 int ResourceVar::GetPendingBrowserHostId() const {
17 return 0;
18 }
19
12 const IPC::Message* ResourceVar::GetCreationMessage() const { 20 const IPC::Message* ResourceVar::GetCreationMessage() const {
13 return NULL; 21 return NULL;
14 } 22 }
15 23
16 ResourceVar* ResourceVar::AsResourceVar() { 24 ResourceVar* ResourceVar::AsResourceVar() {
17 return this; 25 return this;
18 } 26 }
19 27
20 PP_VarType ResourceVar::GetType() const { 28 PP_VarType ResourceVar::GetType() const {
21 return PP_VARTYPE_RESOURCE; 29 return PP_VARTYPE_RESOURCE;
22 } 30 }
23 31
24 // static 32 // static
25 ResourceVar* ResourceVar::FromPPVar(PP_Var var) { 33 ResourceVar* ResourceVar::FromPPVar(PP_Var var) {
26 if (var.type != PP_VARTYPE_RESOURCE) 34 if (var.type != PP_VARTYPE_RESOURCE)
27 return NULL; 35 return NULL;
28 scoped_refptr<Var> var_object( 36 scoped_refptr<Var> var_object(
29 PpapiGlobals::Get()->GetVarTracker()->GetVar(var)); 37 PpapiGlobals::Get()->GetVarTracker()->GetVar(var));
30 if (!var_object.get()) 38 if (!var_object.get())
31 return NULL; 39 return NULL;
32 return var_object->AsResourceVar(); 40 return var_object->AsResourceVar();
33 } 41 }
34 42
35 ResourceVar::ResourceVar() {} 43 ResourceVar::ResourceVar() {}
36 44
37 ResourceVar::~ResourceVar() {} 45 ResourceVar::~ResourceVar() {}
38 46
39 } // namespace ppapi 47 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/resource_var.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698