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

Unified Diff: ppapi/cpp/file_ref.cc

Issue 7210027: Part I of many. Moving FileIO, FileRef, and FileSystem out of Dev. For now, just copying over s... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/cpp/file_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/cpp/file_ref.cc
===================================================================
--- ppapi/cpp/file_ref.cc (revision 89748)
+++ ppapi/cpp/file_ref.cc (working copy)
@@ -1,12 +1,12 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ppapi/cpp/dev/file_ref_dev.h"
+#include "ppapi/cpp/file_ref.h"
#include "ppapi/c/pp_errors.h"
#include "ppapi/cpp/completion_callback.h"
-#include "ppapi/cpp/dev/file_system_dev.h"
+#include "ppapi/cpp/file_system.h"
#include "ppapi/cpp/module_impl.h"
@@ -14,100 +14,100 @@
namespace {
-template <> const char* interface_name<PPB_FileRef_Dev>() {
- return PPB_FILEREF_DEV_INTERFACE;
+template <> const char* interface_name<PPB_FileRef>() {
+ return PPB_FILEREF_INTERFACE;
}
} // namespace
-FileRef_Dev::FileRef_Dev(PP_Resource resource) : Resource(resource) {
+FileRef::FileRef(PP_Resource resource) : Resource(resource) {
}
-FileRef_Dev::FileRef_Dev(PassRef, PP_Resource resource) {
+FileRef::FileRef(PassRef, PP_Resource resource) {
PassRefFromConstructor(resource);
}
-FileRef_Dev::FileRef_Dev(const FileSystem_Dev& file_system,
- const char* path) {
- if (!has_interface<PPB_FileRef_Dev>())
+FileRef::FileRef(const FileSystem& file_system,
+ const char* path) {
+ if (!has_interface<PPB_FileRef>())
return;
- PassRefFromConstructor(get_interface<PPB_FileRef_Dev>()->Create(
+ PassRefFromConstructor(get_interface<PPB_FileRef>()->Create(
file_system.pp_resource(), path));
}
-FileRef_Dev::FileRef_Dev(const FileRef_Dev& other)
+FileRef::FileRef(const FileRef& other)
: Resource(other) {
}
-PP_FileSystemType_Dev FileRef_Dev::GetFileSystemType() const {
- if (!has_interface<PPB_FileRef_Dev>())
+PP_FileSystemType FileRef::GetFileSystemType() const {
+ if (!has_interface<PPB_FileRef>())
return PP_FILESYSTEMTYPE_EXTERNAL;
- return get_interface<PPB_FileRef_Dev>()->GetFileSystemType(pp_resource());
+ return get_interface<PPB_FileRef>()->GetFileSystemType(pp_resource());
}
-Var FileRef_Dev::GetName() const {
- if (!has_interface<PPB_FileRef_Dev>())
+Var FileRef::GetName() const {
+ if (!has_interface<PPB_FileRef>())
return Var();
return Var(Var::PassRef(),
- get_interface<PPB_FileRef_Dev>()->GetName(pp_resource()));
+ get_interface<PPB_FileRef>()->GetName(pp_resource()));
}
-Var FileRef_Dev::GetPath() const {
- if (!has_interface<PPB_FileRef_Dev>())
+Var FileRef::GetPath() const {
+ if (!has_interface<PPB_FileRef>())
return Var();
return Var(Var::PassRef(),
- get_interface<PPB_FileRef_Dev>()->GetPath(pp_resource()));
+ get_interface<PPB_FileRef>()->GetPath(pp_resource()));
}
-FileRef_Dev FileRef_Dev::GetParent() const {
- if (!has_interface<PPB_FileRef_Dev>())
- return FileRef_Dev();
- return FileRef_Dev(PassRef(),
- get_interface<PPB_FileRef_Dev>()->GetParent(
+FileRef FileRef::GetParent() const {
+ if (!has_interface<PPB_FileRef>())
+ return FileRef();
+ return FileRef(PassRef(),
+ get_interface<PPB_FileRef>()->GetParent(
pp_resource()));
}
-int32_t FileRef_Dev::MakeDirectory(const CompletionCallback& cc) {
- if (!has_interface<PPB_FileRef_Dev>())
+int32_t FileRef::MakeDirectory(const CompletionCallback& cc) {
+ if (!has_interface<PPB_FileRef>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_FileRef_Dev>()->MakeDirectory(
+ return get_interface<PPB_FileRef>()->MakeDirectory(
pp_resource(),
PP_FALSE, // make_ancestors
cc.pp_completion_callback());
}
-int32_t FileRef_Dev::MakeDirectoryIncludingAncestors(
+int32_t FileRef::MakeDirectoryIncludingAncestors(
const CompletionCallback& cc) {
- if (!has_interface<PPB_FileRef_Dev>())
+ if (!has_interface<PPB_FileRef>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_FileRef_Dev>()->MakeDirectory(
+ return get_interface<PPB_FileRef>()->MakeDirectory(
pp_resource(),
PP_TRUE, // make_ancestors
cc.pp_completion_callback());
}
-int32_t FileRef_Dev::Touch(PP_Time last_access_time,
- PP_Time last_modified_time,
- const CompletionCallback& cc) {
- if (!has_interface<PPB_FileRef_Dev>())
+int32_t FileRef::Touch(PP_Time last_access_time,
+ PP_Time last_modified_time,
+ const CompletionCallback& cc) {
+ if (!has_interface<PPB_FileRef>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_FileRef_Dev>()->Touch(
+ return get_interface<PPB_FileRef>()->Touch(
pp_resource(), last_access_time, last_modified_time,
cc.pp_completion_callback());
}
-int32_t FileRef_Dev::Delete(const CompletionCallback& cc) {
- if (!has_interface<PPB_FileRef_Dev>())
+int32_t FileRef::Delete(const CompletionCallback& cc) {
+ if (!has_interface<PPB_FileRef>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_FileRef_Dev>()->Delete(
+ return get_interface<PPB_FileRef>()->Delete(
pp_resource(), cc.pp_completion_callback());
}
-int32_t FileRef_Dev::Rename(const FileRef_Dev& new_file_ref,
+int32_t FileRef::Rename(const FileRef& new_file_ref,
const CompletionCallback& cc) {
- if (!has_interface<PPB_FileRef_Dev>())
+ if (!has_interface<PPB_FileRef>())
return PP_ERROR_NOINTERFACE;
- return get_interface<PPB_FileRef_Dev>()->Rename(
+ return get_interface<PPB_FileRef>()->Rename(
pp_resource(), new_file_ref.pp_resource(), cc.pp_completion_callback());
}
« no previous file with comments | « ppapi/cpp/file_ref.h ('k') | ppapi/cpp/file_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698