| OLD | NEW |
| 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/files/file_util_proxy.h" |
| 12 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 13 #include "base/message_loop_proxy.h" | 14 #include "base/message_loop_proxy.h" |
| 14 #include "base/platform_file.h" | 15 #include "base/platform_file.h" |
| 15 #include "base/process.h" | 16 #include "base/process.h" |
| 16 #include "base/shared_memory.h" | 17 #include "base/shared_memory.h" |
| 17 #include "base/sync_socket.h" | 18 #include "base/sync_socket.h" |
| 18 #include "base/time.h" | 19 #include "base/time.h" |
| 19 #include "googleurl/src/gurl.h" | 20 #include "googleurl/src/gurl.h" |
| 20 #include "ipc/ipc_platform_file.h" | 21 #include "ipc/ipc_platform_file.h" |
| 21 #include "media/video/capture/video_capture.h" | 22 #include "media/video/capture/video_capture.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 46 | 47 |
| 47 namespace WebKit { | 48 namespace WebKit { |
| 48 class WebGraphicsContext3D; | 49 class WebGraphicsContext3D; |
| 49 } | 50 } |
| 50 | 51 |
| 51 namespace base { | 52 namespace base { |
| 52 class MessageLoopProxy; | 53 class MessageLoopProxy; |
| 53 class Time; | 54 class Time; |
| 54 } | 55 } |
| 55 | 56 |
| 56 namespace fileapi { | |
| 57 class FileSystemCallbackDispatcher; | |
| 58 } | |
| 59 | |
| 60 namespace gfx { | 57 namespace gfx { |
| 61 class Point; | 58 class Point; |
| 62 } | 59 } |
| 63 | 60 |
| 64 namespace gpu { | 61 namespace gpu { |
| 65 class CommandBuffer; | 62 class CommandBuffer; |
| 66 } | 63 } |
| 67 | 64 |
| 68 namespace ppapi { | 65 namespace ppapi { |
| 69 class PepperFilePath; | 66 class PepperFilePath; |
| (...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 void (base::PlatformFileError error, | 488 void (base::PlatformFileError error, |
| 492 base::PassPlatformFile file, | 489 base::PassPlatformFile file, |
| 493 quota::QuotaLimitType quota_policy, | 490 quota::QuotaLimitType quota_policy, |
| 494 const NotifyCloseFileCallback& close_file_callback)> | 491 const NotifyCloseFileCallback& close_file_callback)> |
| 495 AsyncOpenFileSystemURLCallback; | 492 AsyncOpenFileSystemURLCallback; |
| 496 virtual bool AsyncOpenFileSystemURL( | 493 virtual bool AsyncOpenFileSystemURL( |
| 497 const GURL& path, | 494 const GURL& path, |
| 498 int flags, | 495 int flags, |
| 499 const AsyncOpenFileSystemURLCallback& callback) = 0; | 496 const AsyncOpenFileSystemURLCallback& callback) = 0; |
| 500 | 497 |
| 498 // Callback typedefs for FileSystem related methods. |
| 499 typedef base::Callback<void (base::PlatformFileError)> StatusCallback; |
| 500 typedef base::Callback<void( |
| 501 base::PlatformFileError error, |
| 502 const std::vector<base::FileUtilProxy::Entry>& entries, |
| 503 bool has_more)> ReadDirectoryCallback; |
| 504 typedef base::Callback<void( |
| 505 base::PlatformFileError error, |
| 506 const base::PlatformFileInfo& file_info, |
| 507 const base::FilePath& platform_path)> MetadataCallback; |
| 508 |
| 501 virtual bool MakeDirectory( | 509 virtual bool MakeDirectory( |
| 502 const GURL& path, | 510 const GURL& path, |
| 503 bool recursive, | 511 bool recursive, |
| 504 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 512 const StatusCallback& callback) = 0; |
| 505 virtual bool Query(const GURL& path, | 513 virtual bool Query(const GURL& path, |
| 506 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 514 const MetadataCallback& callback) = 0; |
| 507 virtual bool ReadDirectoryEntries( | 515 virtual bool ReadDirectoryEntries( |
| 508 const GURL& path, | 516 const GURL& path, |
| 509 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 517 const ReadDirectoryCallback& callback) = 0; |
| 510 virtual bool Touch(const GURL& path, | 518 virtual bool Touch(const GURL& path, |
| 511 const base::Time& last_access_time, | 519 const base::Time& last_access_time, |
| 512 const base::Time& last_modified_time, | 520 const base::Time& last_modified_time, |
| 513 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 521 const StatusCallback& callback) = 0; |
| 514 virtual bool SetLength(const GURL& path, | 522 virtual bool SetLength(const GURL& path, |
| 515 int64_t length, | 523 int64_t length, |
| 516 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 524 const StatusCallback& callback) = 0; |
| 517 virtual bool Delete(const GURL& path, | 525 virtual bool Delete(const GURL& path, |
| 518 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 526 const StatusCallback& callback) = 0; |
| 519 virtual bool Rename(const GURL& file_path, | 527 virtual bool Rename(const GURL& file_path, |
| 520 const GURL& new_file_path, | 528 const GURL& new_file_path, |
| 521 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 529 const StatusCallback& callback) = 0; |
| 522 virtual bool ReadDirectory( | 530 virtual bool ReadDirectory( |
| 523 const GURL& directory_path, | 531 const GURL& directory_path, |
| 524 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 532 const ReadDirectoryCallback& callback) = 0; |
| 525 | 533 |
| 526 // For quota handlings for FileIO API. | 534 // For quota handlings for FileIO API. |
| 527 typedef base::Callback<void (int64)> AvailableSpaceCallback; | 535 typedef base::Callback<void (int64)> AvailableSpaceCallback; |
| 528 virtual void QueryAvailableSpace(const GURL& origin, | 536 virtual void QueryAvailableSpace(const GURL& origin, |
| 529 quota::StorageType type, | 537 quota::StorageType type, |
| 530 const AvailableSpaceCallback& callback) = 0; | 538 const AvailableSpaceCallback& callback) = 0; |
| 531 virtual void WillUpdateFile(const GURL& file_path) = 0; | 539 virtual void WillUpdateFile(const GURL& file_path) = 0; |
| 532 virtual void DidUpdateFile(const GURL& file_path, int64_t delta) = 0; | 540 virtual void DidUpdateFile(const GURL& file_path, int64_t delta) = 0; |
| 533 | 541 |
| 534 // Synchronously returns the platform file path for a filesystem URL. | 542 // Synchronously returns the platform file path for a filesystem URL. |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 bool should_close_source) const = 0; | 682 bool should_close_source) const = 0; |
| 675 | 683 |
| 676 // Returns true if running in process. | 684 // Returns true if running in process. |
| 677 virtual bool IsRunningInProcess(PP_Instance instance) const = 0; | 685 virtual bool IsRunningInProcess(PP_Instance instance) const = 0; |
| 678 }; | 686 }; |
| 679 | 687 |
| 680 } // namespace ppapi | 688 } // namespace ppapi |
| 681 } // namespace webkit | 689 } // namespace webkit |
| 682 | 690 |
| 683 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 691 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |