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

Side by Side Diff: webkit/plugins/ppapi/plugin_delegate.h

Issue 13726024: Refactor FileSystem (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: NON_EXPORTED_BASE Created 7 years, 8 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
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_file_ref_impl.h » ('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) 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_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/message_loop_proxy.h" 13 #include "base/message_loop_proxy.h"
14 #include "base/platform_file.h" 14 #include "base/platform_file.h"
15 #include "base/process.h" 15 #include "base/process.h"
16 #include "base/shared_memory.h" 16 #include "base/shared_memory.h"
17 #include "base/sync_socket.h" 17 #include "base/sync_socket.h"
18 #include "base/time.h" 18 #include "base/time.h"
19 #include "googleurl/src/gurl.h" 19 #include "googleurl/src/gurl.h"
20 #include "ipc/ipc_platform_file.h" 20 #include "ipc/ipc_platform_file.h"
21 #include "media/video/capture/video_capture.h" 21 #include "media/video/capture/video_capture.h"
22 #include "media/video/video_decode_accelerator.h" 22 #include "media/video/video_decode_accelerator.h"
23 #include "ppapi/c/dev/pp_video_dev.h" 23 #include "ppapi/c/dev/pp_video_dev.h"
24 #include "ppapi/c/dev/ppb_device_ref_dev.h" 24 #include "ppapi/c/dev/ppb_device_ref_dev.h"
25 #include "ppapi/c/pp_completion_callback.h" 25 #include "ppapi/c/pp_completion_callback.h"
26 #include "ppapi/c/pp_errors.h" 26 #include "ppapi/c/pp_errors.h"
27 #include "ppapi/c/pp_file_info.h"
27 #include "ppapi/c/pp_instance.h" 28 #include "ppapi/c/pp_instance.h"
28 #include "ppapi/c/pp_resource.h" 29 #include "ppapi/c/pp_resource.h"
29 #include "ppapi/c/pp_stdint.h" 30 #include "ppapi/c/pp_stdint.h"
30 #include "ppapi/c/private/ppb_flash.h" 31 #include "ppapi/c/private/ppb_flash.h"
31 #include "ppapi/c/private/ppb_tcp_socket_private.h" 32 #include "ppapi/c/private/ppb_tcp_socket_private.h"
32 #include "ppapi/c/private/ppb_udp_socket_private.h" 33 #include "ppapi/c/private/ppb_udp_socket_private.h"
33 #include "ppapi/shared_impl/dir_contents.h" 34 #include "ppapi/shared_impl/dir_contents.h"
34 #include "ui/gfx/size.h" 35 #include "ui/gfx/size.h"
35 #include "webkit/fileapi/file_system_types.h" 36 #include "webkit/fileapi/file_system_types.h"
36 #include "webkit/glue/clipboard_client.h" 37 #include "webkit/glue/clipboard_client.h"
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 // Notifies that the index of the currently selected item has been updated. 458 // Notifies that the index of the currently selected item has been updated.
458 virtual void SelectedFindResultChanged(int identifier, int index) = 0; 459 virtual void SelectedFindResultChanged(int identifier, int index) = 0;
459 460
460 // Sends an async IPC to open a local file. 461 // Sends an async IPC to open a local file.
461 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)> 462 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)>
462 AsyncOpenFileCallback; 463 AsyncOpenFileCallback;
463 virtual bool AsyncOpenFile(const base::FilePath& path, 464 virtual bool AsyncOpenFile(const base::FilePath& path,
464 int flags, 465 int flags,
465 const AsyncOpenFileCallback& callback) = 0; 466 const AsyncOpenFileCallback& callback) = 0;
466 467
468 // These functions expose some of PepperFileSystemHost methods for
469 // PPB_FileRef_Impl (which is in webkit) to access. Once we migrate FileRef
470 // to the new design in content/, we won't need this delegation.
471 // TODO(victorhsieh): remove these delegation.
472 virtual bool IsFileSystemOpened(PP_Instance instance,
473 PP_Resource resource) const = 0;
474 virtual PP_FileSystemType GetFileSystemType(PP_Instance instance,
475 PP_Resource resource) const = 0;
476 virtual GURL GetFileSystemRootUrl(PP_Instance instance,
477 PP_Resource resource) const = 0;
478
467 // Sends an async IPC to open a file through filesystem API. 479 // Sends an async IPC to open a file through filesystem API.
468 // When a file is successfully opened, |callback| is invoked with 480 // When a file is successfully opened, |callback| is invoked with
469 // PLATFORM_FILE_OK, the opened file handle, and a callback function for 481 // PLATFORM_FILE_OK, the opened file handle, and a callback function for
470 // notifying that the file is closed. When the users of this function 482 // notifying that the file is closed. When the users of this function
471 // finished using the file, they must close the file handle and then must call 483 // finished using the file, they must close the file handle and then must call
472 // the supplied callback function. 484 // the supplied callback function.
473 typedef base::Callback<void (base::PlatformFileError)> 485 typedef base::Callback<void (base::PlatformFileError)>
474 NotifyCloseFileCallback; 486 NotifyCloseFileCallback;
475 typedef base::Callback< 487 typedef base::Callback<
476 void (base::PlatformFileError, 488 void (base::PlatformFileError,
477 base::PassPlatformFile, 489 base::PassPlatformFile,
478 quota::QuotaLimitType, 490 quota::QuotaLimitType,
479 const NotifyCloseFileCallback&)> AsyncOpenFileSystemURLCallback; 491 const NotifyCloseFileCallback&)> AsyncOpenFileSystemURLCallback;
480 virtual bool AsyncOpenFileSystemURL( 492 virtual bool AsyncOpenFileSystemURL(
481 const GURL& path, 493 const GURL& path,
482 int flags, 494 int flags,
483 const AsyncOpenFileSystemURLCallback& callback) = 0; 495 const AsyncOpenFileSystemURLCallback& callback) = 0;
484 496
485 virtual bool OpenFileSystem(
486 const GURL& origin_url,
487 fileapi::FileSystemType type,
488 long long size,
489 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
490 virtual bool MakeDirectory( 497 virtual bool MakeDirectory(
491 const GURL& path, 498 const GURL& path,
492 bool recursive, 499 bool recursive,
493 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; 500 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
494 virtual bool Query(const GURL& path, 501 virtual bool Query(const GURL& path,
495 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; 502 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
496 virtual bool Touch(const GURL& path, 503 virtual bool Touch(const GURL& path,
497 const base::Time& last_access_time, 504 const base::Time& last_access_time,
498 const base::Time& last_modified_time, 505 const base::Time& last_modified_time,
499 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; 506 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0;
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
651 const EnumerateDevicesCallback& callback) = 0; 658 const EnumerateDevicesCallback& callback) = 0;
652 // Stop enumerating devices of the specified |request_id|. The |request_id| 659 // Stop enumerating devices of the specified |request_id|. The |request_id|
653 // is the return value of EnumerateDevicesCallback. 660 // is the return value of EnumerateDevicesCallback.
654 virtual void StopEnumerateDevices(int request_id) = 0; 661 virtual void StopEnumerateDevices(int request_id) = 0;
655 662
656 // Share a given handle with the target process. 663 // Share a given handle with the target process.
657 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 664 virtual IPC::PlatformFileForTransit ShareHandleWithRemote(
658 base::PlatformFile handle, 665 base::PlatformFile handle,
659 base::ProcessId target_process_id, 666 base::ProcessId target_process_id,
660 bool should_close_source) const = 0; 667 bool should_close_source) const = 0;
668
669 // Returns true if running in process.
670 virtual bool IsRunningInProcess(PP_Instance instance) const = 0;
661 }; 671 };
662 672
663 } // namespace ppapi 673 } // namespace ppapi
664 } // namespace webkit 674 } // namespace webkit
665 675
666 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ 676 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_
OLDNEW
« no previous file with comments | « webkit/plugins/ppapi/mock_plugin_delegate.cc ('k') | webkit/plugins/ppapi/ppb_file_ref_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698