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

Side by Side Diff: trunk/src/webkit/browser/fileapi/file_system_operation.h

Issue 60323002: Revert 232547 "Pepper: Move FileIO host from renderer to browser." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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
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 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ 5 #ifndef WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_
6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ 6 #define WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 typedef base::Callback< 73 typedef base::Callback<
74 void(base::PlatformFileError result, 74 void(base::PlatformFileError result,
75 const base::PlatformFileInfo& file_info)> GetMetadataCallback; 75 const base::PlatformFileInfo& file_info)> GetMetadataCallback;
76 76
77 // Used for OpenFile(). |result| is the return code of the operation. 77 // Used for OpenFile(). |result| is the return code of the operation.
78 // |on_close_callback| will be called after the file is closed in the child 78 // |on_close_callback| will be called after the file is closed in the child
79 // process. It can be null, if no operation is needed on closing a file. 79 // process. It can be null, if no operation is needed on closing a file.
80 typedef base::Callback< 80 typedef base::Callback<
81 void(base::PlatformFileError result, 81 void(base::PlatformFileError result,
82 base::PlatformFile file, 82 base::PlatformFile file,
83 const base::Closure& on_close_callback)> OpenFileCallback; 83 const base::Closure& on_close_callback,
84 base::ProcessHandle peer_handle)> OpenFileCallback;
84 85
85 // Used for ReadDirectoryCallback. 86 // Used for ReadDirectoryCallback.
86 typedef std::vector<DirectoryEntry> FileEntryList; 87 typedef std::vector<DirectoryEntry> FileEntryList;
87 88
88 // Used for ReadDirectory(). |result| is the return code of the operation, 89 // Used for ReadDirectory(). |result| is the return code of the operation,
89 // |file_list| is the list of files read, and |has_more| is true if some files 90 // |file_list| is the list of files read, and |has_more| is true if some files
90 // are yet to be read. 91 // are yet to be read.
91 typedef base::Callback< 92 typedef base::Callback<
92 void(base::PlatformFileError result, 93 void(base::PlatformFileError result,
93 const FileEntryList& file_list, 94 const FileEntryList& file_list,
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 // 348 //
348 // This function is used only by Pepper as of writing. 349 // This function is used only by Pepper as of writing.
349 virtual void TouchFile(const FileSystemURL& path, 350 virtual void TouchFile(const FileSystemURL& path,
350 const base::Time& last_access_time, 351 const base::Time& last_access_time,
351 const base::Time& last_modified_time, 352 const base::Time& last_modified_time,
352 const StatusCallback& callback) = 0; 353 const StatusCallback& callback) = 0;
353 354
354 // Opens a file at |path| with |file_flags|, where flags are OR'ed 355 // Opens a file at |path| with |file_flags|, where flags are OR'ed
355 // values of base::PlatformFileFlags. 356 // values of base::PlatformFileFlags.
356 // 357 //
358 // |peer_handle| is the process handle of a pepper plugin process, which
359 // is necessary for underlying IPC calls with Pepper plugins.
360 //
357 // This function is used only by Pepper as of writing. 361 // This function is used only by Pepper as of writing.
358 virtual void OpenFile(const FileSystemURL& path, 362 virtual void OpenFile(const FileSystemURL& path,
359 int file_flags, 363 int file_flags,
364 base::ProcessHandle peer_handle,
360 const OpenFileCallback& callback) = 0; 365 const OpenFileCallback& callback) = 0;
361 366
362 // Creates a local snapshot file for a given |path| and returns the 367 // Creates a local snapshot file for a given |path| and returns the
363 // metadata and platform path of the snapshot file via |callback|. 368 // metadata and platform path of the snapshot file via |callback|.
364 // In local filesystem cases the implementation may simply return 369 // In local filesystem cases the implementation may simply return
365 // the metadata of the file itself (as well as GetMetadata does), 370 // the metadata of the file itself (as well as GetMetadata does),
366 // while in remote filesystem case the backend may want to download the file 371 // while in remote filesystem case the backend may want to download the file
367 // into a temporary snapshot file and return the metadata of the 372 // into a temporary snapshot file and return the metadata of the
368 // temporary file. Or if the implementaiton already has the local cache 373 // temporary file. Or if the implementaiton already has the local cache
369 // data for |path| it can simply return the path to the cache. 374 // data for |path| it can simply return the path to the cache.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 kOperationOpenFile, 482 kOperationOpenFile,
478 kOperationCloseFile, 483 kOperationCloseFile,
479 kOperationGetLocalPath, 484 kOperationGetLocalPath,
480 kOperationCancel, 485 kOperationCancel,
481 }; 486 };
482 }; 487 };
483 488
484 } // namespace fileapi 489 } // namespace fileapi
485 490
486 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_ 491 #endif // WEBKIT_BROWSER_FILEAPI_FILE_SYSTEM_OPERATION_H_
OLDNEW
« no previous file with comments | « trunk/src/ppapi/proxy/file_io_resource.cc ('k') | trunk/src/webkit/browser/fileapi/file_system_operation_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698