Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 | 9 |
| 10 #include "base/callback_old.h" | 10 #include "base/callback_old.h" |
| 11 #include "base/message_loop_proxy.h" | 11 #include "base/message_loop_proxy.h" |
| 12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
| 13 #include "base/platform_file.h" | 13 #include "base/platform_file.h" |
| 14 #include "base/shared_memory.h" | 14 #include "base/shared_memory.h" |
| 15 #include "base/sync_socket.h" | 15 #include "base/sync_socket.h" |
| 16 #include "base/time.h" | 16 #include "base/time.h" |
| 17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
| 18 #include "media/video/video_decode_accelerator.h" | 18 #include "media/video/video_decode_accelerator.h" |
| 19 #include "ppapi/c/dev/pp_video_dev.h" | 19 #include "ppapi/c/dev/pp_video_dev.h" |
| 20 #include "ppapi/c/pp_completion_callback.h" | 20 #include "ppapi/c/pp_completion_callback.h" |
| 21 #include "ppapi/c/pp_errors.h" | 21 #include "ppapi/c/pp_errors.h" |
| 22 #include "ppapi/c/pp_instance.h" | 22 #include "ppapi/c/pp_instance.h" |
| 23 #include "ppapi/c/pp_stdint.h" | 23 #include "ppapi/c/pp_stdint.h" |
| 24 #include "ui/gfx/size.h" | 24 #include "ui/gfx/size.h" |
| 25 #include "webkit/fileapi/file_system_types.h" | 25 #include "webkit/fileapi/file_system_types.h" |
| 26 #include "webkit/plugins/ppapi/dir_contents.h" | 26 #include "webkit/plugins/ppapi/dir_contents.h" |
| 27 #include "webkit/quota/quota_client.h" | |
| 27 | 28 |
| 28 class AudioMessageFilter; | 29 class AudioMessageFilter; |
| 29 class GURL; | 30 class GURL; |
| 30 class P2PSocketDispatcher; | 31 class P2PSocketDispatcher; |
| 31 class SkBitmap; | 32 class SkBitmap; |
| 32 | 33 |
| 33 namespace base { | 34 namespace base { |
| 34 class MessageLoopProxy; | 35 class MessageLoopProxy; |
| 35 class Time; | 36 class Time; |
| 36 } | 37 } |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 | 288 |
| 288 // Notifies that the index of the currently selected item has been updated. | 289 // Notifies that the index of the currently selected item has been updated. |
| 289 virtual void SelectedFindResultChanged(int identifier, int index) = 0; | 290 virtual void SelectedFindResultChanged(int identifier, int index) = 0; |
| 290 | 291 |
| 291 // Runs a file chooser. | 292 // Runs a file chooser. |
| 292 virtual bool RunFileChooser( | 293 virtual bool RunFileChooser( |
| 293 const WebKit::WebFileChooserParams& params, | 294 const WebKit::WebFileChooserParams& params, |
| 294 WebKit::WebFileChooserCompletion* chooser_completion) = 0; | 295 WebKit::WebFileChooserCompletion* chooser_completion) = 0; |
| 295 | 296 |
| 296 // Sends an async IPC to open a file. | 297 // Sends an async IPC to open a file. |
| 297 typedef Callback2<base::PlatformFileError, base::PassPlatformFile | 298 typedef Callback3<base::PlatformFileError, |
| 298 >::Type AsyncOpenFileCallback; | 299 base::PassPlatformFile, |
| 300 int64_t /* file_size */>::Type AsyncOpenFileCallback; | |
|
michaeln
2011/07/20 21:28:33
How is this size used? There's no guarantee that i
kinuko
2011/07/21 14:34:08
No, but I don't think we can strictly guarantee ac
| |
| 299 virtual bool AsyncOpenFile(const FilePath& path, | 301 virtual bool AsyncOpenFile(const FilePath& path, |
| 300 int flags, | 302 int flags, |
| 301 AsyncOpenFileCallback* callback) = 0; | 303 AsyncOpenFileCallback* callback) = 0; |
| 302 virtual bool AsyncOpenFileSystemURL(const GURL& path, | 304 virtual bool AsyncOpenFileSystemURL(const GURL& path, |
| 303 int flags, | 305 int flags, |
| 304 AsyncOpenFileCallback* callback) = 0; | 306 AsyncOpenFileCallback* callback) = 0; |
| 305 | 307 |
| 306 virtual bool OpenFileSystem( | 308 virtual bool OpenFileSystem( |
| 307 const GURL& url, | 309 const GURL& url, |
| 308 fileapi::FileSystemType type, | 310 fileapi::FileSystemType type, |
| (...skipping 11 matching lines...) Expand all Loading... | |
| 320 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 322 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 321 virtual bool Delete(const GURL& path, | 323 virtual bool Delete(const GURL& path, |
| 322 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 324 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 323 virtual bool Rename(const GURL& file_path, | 325 virtual bool Rename(const GURL& file_path, |
| 324 const GURL& new_file_path, | 326 const GURL& new_file_path, |
| 325 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 327 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 326 virtual bool ReadDirectory( | 328 virtual bool ReadDirectory( |
| 327 const GURL& directory_path, | 329 const GURL& directory_path, |
| 328 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 330 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 329 | 331 |
| 332 // For quota handlings for FileIO API. | |
| 333 typedef Callback1<int64>::Type AvailableSpaceCallback; | |
| 334 virtual bool QueryAvailableSpace( | |
|
michaeln
2011/07/20 21:28:33
Does the return value mean anything? I don't see t
kinuko
2011/07/21 14:34:08
Done.
| |
| 335 const GURL& origin, | |
| 336 quota::StorageType type, | |
| 337 AvailableSpaceCallback* callback) = 0; | |
| 338 virtual void NotifyStorageModified(quota::QuotaClient::ID client_id, | |
| 339 const GURL& origin, | |
| 340 quota::StorageType type, | |
| 341 int64 delta) = 0; | |
| 342 | |
| 330 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, | 343 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, |
| 331 int flags, | 344 int flags, |
| 332 base::PlatformFile* file) = 0; | 345 base::PlatformFile* file) = 0; |
| 333 virtual base::PlatformFileError RenameFile(const PepperFilePath& from_path, | 346 virtual base::PlatformFileError RenameFile(const PepperFilePath& from_path, |
| 334 const PepperFilePath& to_path) = 0; | 347 const PepperFilePath& to_path) = 0; |
| 335 virtual base::PlatformFileError DeleteFileOrDir(const PepperFilePath& path, | 348 virtual base::PlatformFileError DeleteFileOrDir(const PepperFilePath& path, |
| 336 bool recursive) = 0; | 349 bool recursive) = 0; |
| 337 virtual base::PlatformFileError CreateDir(const PepperFilePath& path) = 0; | 350 virtual base::PlatformFileError CreateDir(const PepperFilePath& path) = 0; |
| 338 virtual base::PlatformFileError QueryFile(const PepperFilePath& path, | 351 virtual base::PlatformFileError QueryFile(const PepperFilePath& path, |
| 339 base::PlatformFileInfo* info) = 0; | 352 base::PlatformFileInfo* info) = 0; |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 414 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; | 427 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; |
| 415 | 428 |
| 416 // Returns the current preferences. | 429 // Returns the current preferences. |
| 417 virtual ::ppapi::Preferences GetPreferences() = 0; | 430 virtual ::ppapi::Preferences GetPreferences() = 0; |
| 418 }; | 431 }; |
| 419 | 432 |
| 420 } // namespace ppapi | 433 } // namespace ppapi |
| 421 } // namespace webkit | 434 } // namespace webkit |
| 422 | 435 |
| 423 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 436 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |