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

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

Issue 10544089: Implement the file chooser as a new resource "host" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/ppb_file_ref_shared.h" 5 #include "ppapi/shared_impl/ppb_file_ref_shared.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ppapi/shared_impl/var.h" 8 #include "ppapi/shared_impl/var.h"
9 9
10 namespace ppapi { 10 namespace ppapi {
11 11
12 PPB_FileRef_Shared::PPB_FileRef_Shared(ResourceObjectType type, 12 PPB_FileRef_Shared::PPB_FileRef_Shared(ResourceObjectType type,
13 const PPB_FileRef_CreateInfo& info) 13 const PPB_FileRef_CreateInfo& info)
14 : Resource(type, info.resource), 14 : Resource(type, info.resource),
15 create_info_(info) { 15 create_info_(info) {
16 if (type == OBJECT_IS_IMPL) { 16 if (type == OBJECT_IS_IMPL) {
17 // Resource's constructor assigned a PP_Resource, so we can fill out our 17 // Resource's constructor assigned a PP_Resource, so we can fill out our
18 // host resource now. 18 // host resource now.
19 create_info_.resource = host_resource(); 19 create_info_.resource = host_resource();
20 DCHECK(!create_info_.resource.is_null()); 20 // DCHECK(!create_info_.resource.is_null());
bbudge 2012/07/02 20:06:06 ?
21 } 21 }
22 } 22 }
23 23
24 PPB_FileRef_Shared::~PPB_FileRef_Shared() { 24 PPB_FileRef_Shared::~PPB_FileRef_Shared() {
25 } 25 }
26 26
27 thunk::PPB_FileRef_API* PPB_FileRef_Shared::AsPPB_FileRef_API() { 27 thunk::PPB_FileRef_API* PPB_FileRef_Shared::AsPPB_FileRef_API() {
28 return this; 28 return this;
29 } 29 }
30 30
(...skipping 15 matching lines...) Expand all
46 path_var_ = new StringVar(create_info_.path); 46 path_var_ = new StringVar(create_info_.path);
47 } 47 }
48 return path_var_->GetPPVar(); 48 return path_var_->GetPPVar();
49 } 49 }
50 50
51 const PPB_FileRef_CreateInfo& PPB_FileRef_Shared::GetCreateInfo() const { 51 const PPB_FileRef_CreateInfo& PPB_FileRef_Shared::GetCreateInfo() const {
52 return create_info_; 52 return create_info_;
53 } 53 }
54 54
55 } // namespace ppapi 55 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698