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_types.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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 virtual bool ReadDirectory( | 327 virtual bool ReadDirectory( |
327 const GURL& directory_path, | 328 const GURL& directory_path, |
328 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 329 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
329 | 330 |
330 // Takes a UTF-8 string representing the enterprise policy, and pushes it to | 331 // Takes a UTF-8 string representing the enterprise policy, and pushes it to |
331 // every plugin instance that has called SubscribeToPolicyUpdates(). | 332 // every plugin instance that has called SubscribeToPolicyUpdates(). |
332 // | 333 // |
333 // This should be called when the enterprise policy is updated. | 334 // This should be called when the enterprise policy is updated. |
334 virtual void PublishPolicy(const std::string& policy_json) = 0; | 335 virtual void PublishPolicy(const std::string& policy_json) = 0; |
335 | 336 |
| 337 // For quota handlings for FileIO API. |
| 338 typedef Callback1<int64>::Type AvailableSpaceCallback; |
| 339 virtual void QueryAvailableSpace(const GURL& origin, |
| 340 quota::StorageType type, |
| 341 AvailableSpaceCallback* callback) = 0; |
| 342 virtual void WillUpdateFile(const GURL& file_path) = 0; |
| 343 virtual void DidUpdateFile(const GURL& file_path, int64_t delta) = 0; |
| 344 |
336 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, | 345 virtual base::PlatformFileError OpenFile(const PepperFilePath& path, |
337 int flags, | 346 int flags, |
338 base::PlatformFile* file) = 0; | 347 base::PlatformFile* file) = 0; |
339 virtual base::PlatformFileError RenameFile(const PepperFilePath& from_path, | 348 virtual base::PlatformFileError RenameFile(const PepperFilePath& from_path, |
340 const PepperFilePath& to_path) = 0; | 349 const PepperFilePath& to_path) = 0; |
341 virtual base::PlatformFileError DeleteFileOrDir(const PepperFilePath& path, | 350 virtual base::PlatformFileError DeleteFileOrDir(const PepperFilePath& path, |
342 bool recursive) = 0; | 351 bool recursive) = 0; |
343 virtual base::PlatformFileError CreateDir(const PepperFilePath& path) = 0; | 352 virtual base::PlatformFileError CreateDir(const PepperFilePath& path) = 0; |
344 virtual base::PlatformFileError QueryFile(const PepperFilePath& path, | 353 virtual base::PlatformFileError QueryFile(const PepperFilePath& path, |
345 base::PlatformFileInfo* info) = 0; | 354 base::PlatformFileInfo* info) = 0; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; | 433 virtual base::SharedMemory* CreateAnonymousSharedMemory(uint32_t size) = 0; |
425 | 434 |
426 // Returns the current preferences. | 435 // Returns the current preferences. |
427 virtual ::ppapi::Preferences GetPreferences() = 0; | 436 virtual ::ppapi::Preferences GetPreferences() = 0; |
428 }; | 437 }; |
429 | 438 |
430 } // namespace ppapi | 439 } // namespace ppapi |
431 } // namespace webkit | 440 } // namespace webkit |
432 | 441 |
433 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 442 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
OLD | NEW |