diff options
author | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 22:49:02 +0000 |
---|---|---|
committer | teravest@chromium.org <teravest@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-04 22:49:02 +0000 |
commit | 66c8f3c44ef87cf0038989853696c23d28aa7b29 (patch) | |
tree | b05aac3693ad342f76cf0ccc9d1f9e87d77fc75d /ppapi/shared_impl/ppb_file_ref_shared.h | |
parent | e87fd3fb5c3dbe5d93ddd7dcf7bbced9f853ce30 (diff) | |
download | chromium_src-66c8f3c44ef87cf0038989853696c23d28aa7b29.zip chromium_src-66c8f3c44ef87cf0038989853696c23d28aa7b29.tar.gz chromium_src-66c8f3c44ef87cf0038989853696c23d28aa7b29.tar.bz2 |
Pepper: Move FileRef to the "new" resource proxy.
This change moves the FileRef implementation from the previous one in the "old"
resource model (ppb_file_ref_impl.cc) to the "new" resource model
(pepper_file_ref_host.cc), and from the renderer to the browser.
As many as possible of the supporting changes were split off to other changes
to minimize the size of this change. Unfortunately, a lot of changes for
URLLoader had to be rolled into this change.
The data structures for CreateInfo have changed, and all users of FileRef have
to be moved over, which is what causes this change to be so large.
TBR=dmichael@chromium.org, jschuh@chromium.org, yzshen@chromium.org
BUG=225441
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=216744
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=218305
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=219911
Review URL: https://codereview.chromium.org/21966004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@221284 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/shared_impl/ppb_file_ref_shared.h')
-rw-r--r-- | ppapi/shared_impl/ppb_file_ref_shared.h | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/ppapi/shared_impl/ppb_file_ref_shared.h b/ppapi/shared_impl/ppb_file_ref_shared.h deleted file mode 100644 index 5025eb3..0000000 --- a/ppapi/shared_impl/ppb_file_ref_shared.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2012 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. - -#ifndef PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ -#define PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ - -#include <string> - -#include "base/compiler_specific.h" -#include "ppapi/shared_impl/resource.h" -#include "ppapi/thunk/ppb_file_ref_api.h" - -namespace ppapi { - -class StringVar; - -// FileRefs are created in a number of places and they include a number of -// return values. This struct encapsulates everything in one place. -struct PPB_FileRef_CreateInfo { - PPB_FileRef_CreateInfo() - : file_system_type(PP_FILESYSTEMTYPE_EXTERNAL), - file_system_plugin_resource(0) {} - - ppapi::HostResource resource; - int file_system_type; // One of PP_FileSystemType values. - std::string path; - std::string name; - - // Since FileRef needs to hold a FileSystem reference, we need to pass the - // resource in this CreateInfo. Note that this is a plugin resource as - // FileSystem is already in new design. - PP_Resource file_system_plugin_resource; -}; - -// This class provides the shared implementation of a FileRef. The functions -// that actually "do stuff" like Touch and MakeDirectory are implemented -// differently for the proxied and non-proxied derived classes. -class PPAPI_SHARED_EXPORT PPB_FileRef_Shared - : public Resource, - public thunk::PPB_FileRef_API { - public: - PPB_FileRef_Shared(ResourceObjectType type, - const PPB_FileRef_CreateInfo& info); - virtual ~PPB_FileRef_Shared(); - - // Resource overrides. - virtual thunk::PPB_FileRef_API* AsPPB_FileRef_API() OVERRIDE; - - // PPB_FileRef_API implementation (partial). - virtual PP_FileSystemType GetFileSystemType() const OVERRIDE; - virtual PP_Var GetName() const OVERRIDE; - virtual PP_Var GetPath() const OVERRIDE; - virtual const PPB_FileRef_CreateInfo& GetCreateInfo() const OVERRIDE; - virtual PP_Var GetAbsolutePath() = 0; - - private: - PPB_FileRef_CreateInfo create_info_; - - // Lazily initialized vars created from the create_info_. This is so we can - // return the identical string object every time they're requested. - mutable scoped_refptr<StringVar> name_var_; - mutable scoped_refptr<StringVar> path_var_; - - DISALLOW_IMPLICIT_CONSTRUCTORS(PPB_FileRef_Shared); -}; - -} // namespace ppapi - -#endif // PPAPI_SHARED_IMPL_PPB_FILE_REF_SHARED_H_ |