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

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

Issue 23346009: [PPAPI] Added a new Var subclass, ResourceVar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Added constructor that takes IPC::Message. Created 7 years, 3 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "ppapi/shared_impl/resource_var.h"
6
7 namespace ppapi {
8
9 ResourceVar::ResourceVar() : resource_id_(0) {}
10
11 ResourceVar::ResourceVar(PP_Resource resource_id) : resource_id_(resource_id) {}
12
13 ResourceVar::ResourceVar(const IPC::Message& creation_message)
14 : creation_message_(creation_message) {}
yzshen1 2013/08/28 17:31:58 You should also init resource_id_.
Matt Giuca 2013/08/29 01:44:47 Done.
15
16 ResourceVar::~ResourceVar() {}
17
18 ResourceVar* ResourceVar::AsResourceVar() {
19 return this;
20 }
21
22 PP_VarType ResourceVar::GetType() const {
23 // TODO(mgiuca): Return PP_VARTYPE_RESOURCE, once that is a valid enum value.
24 NOTREACHED();
25 return PP_VARTYPE_UNDEFINED;
26 }
27
28 // static
29 ResourceVar* ResourceVar::FromPPVar(PP_Var var) {
30 // TODO(mgiuca): Implement this function, once PP_VARTYPE_RESOURCE is
31 // introduced.
32 return NULL;
33 }
34
35 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698