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

Side by Side Diff: ppapi/cpp/url_response_info.cc

Issue 4747001: Move URLLoader, URLRequestInfo, and URLResponseInfo out of the dev directory... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 1 month 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/cpp/url_response_info.h ('k') | ppapi/example/example.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 "ppapi/cpp/dev/url_response_info_dev.h" 5 #include "ppapi/cpp/url_response_info.h"
6 6
7 #include "ppapi/cpp/dev/file_ref_dev.h" 7 #include "ppapi/cpp/dev/file_ref_dev.h"
8 #include "ppapi/cpp/module.h" 8 #include "ppapi/cpp/module.h"
9 #include "ppapi/cpp/module_impl.h" 9 #include "ppapi/cpp/module_impl.h"
10 10
11 namespace { 11 namespace {
12 12
13 DeviceFuncs<PPB_URLResponseInfo_Dev> url_response_info_f( 13 DeviceFuncs<PPB_URLResponseInfo> url_response_info_f(
14 PPB_URLRESPONSEINFO_DEV_INTERFACE); 14 PPB_URLRESPONSEINFO_INTERFACE);
15 15
16 } // namespace 16 } // namespace
17 17
18 namespace pp { 18 namespace pp {
19 19
20 URLResponseInfo_Dev::URLResponseInfo_Dev(const URLResponseInfo_Dev& other) 20 URLResponseInfo::URLResponseInfo(const URLResponseInfo& other)
21 : Resource(other) { 21 : Resource(other) {
22 } 22 }
23 23
24 URLResponseInfo_Dev::URLResponseInfo_Dev(PassRef, PP_Resource resource) { 24 URLResponseInfo::URLResponseInfo(PassRef, PP_Resource resource) {
25 PassRefFromConstructor(resource); 25 PassRefFromConstructor(resource);
26 } 26 }
27 27
28 URLResponseInfo_Dev& URLResponseInfo_Dev::operator=( 28 Var URLResponseInfo::GetProperty(PP_URLResponseProperty property) const {
29 const URLResponseInfo_Dev& other) {
30 URLResponseInfo_Dev copy(other);
31 swap(copy);
32 return *this;
33 }
34
35 void URLResponseInfo_Dev::swap(URLResponseInfo_Dev& other) {
36 Resource::swap(other);
37 }
38
39 Var URLResponseInfo_Dev::GetProperty(
40 PP_URLResponseProperty_Dev property) const {
41 if (!url_response_info_f) 29 if (!url_response_info_f)
42 return Var(); 30 return Var();
43 return Var(Var::PassRef(), 31 return Var(Var::PassRef(),
44 url_response_info_f->GetProperty(pp_resource(), property)); 32 url_response_info_f->GetProperty(pp_resource(), property));
45 } 33 }
46 34
47 FileRef_Dev URLResponseInfo_Dev::GetBody() const { 35 FileRef_Dev URLResponseInfo::GetBodyAsFileRef() const {
48 if (!url_response_info_f) 36 if (!url_response_info_f)
49 return FileRef_Dev(); 37 return FileRef_Dev();
50 return FileRef_Dev(FileRef_Dev::PassRef(), 38 return FileRef_Dev(FileRef_Dev::PassRef(),
51 url_response_info_f->GetBody(pp_resource())); 39 url_response_info_f->GetBodyAsFileRef(pp_resource()));
52 } 40 }
53 41
54 } // namespace pp 42 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/url_response_info.h ('k') | ppapi/example/example.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698