Chromium Code Reviews| 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 |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 406 bool final_result) = 0; | 406 bool final_result) = 0; |
| 407 | 407 |
| 408 // Notifies that the index of the currently selected item has been updated. | 408 // Notifies that the index of the currently selected item has been updated. |
| 409 virtual void SelectedFindResultChanged(int identifier, int index) = 0; | 409 virtual void SelectedFindResultChanged(int identifier, int index) = 0; |
| 410 | 410 |
| 411 // Runs a file chooser. | 411 // Runs a file chooser. |
| 412 virtual bool RunFileChooser( | 412 virtual bool RunFileChooser( |
| 413 const WebKit::WebFileChooserParams& params, | 413 const WebKit::WebFileChooserParams& params, |
| 414 WebKit::WebFileChooserCompletion* chooser_completion) = 0; | 414 WebKit::WebFileChooserCompletion* chooser_completion) = 0; |
| 415 | 415 |
| 416 // Sends an async IPC to open a file. | 416 // Sends an async IPC to open a local file. |
| 417 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)> | 417 typedef base::Callback<void (base::PlatformFileError, base::PassPlatformFile)> |
| 418 AsyncOpenFileCallback; | 418 AsyncOpenFileCallback; |
| 419 virtual bool AsyncOpenFile(const FilePath& path, | 419 virtual bool AsyncOpenFile(const FilePath& path, |
| 420 int flags, | 420 int flags, |
| 421 const AsyncOpenFileCallback& callback) = 0; | 421 const AsyncOpenFileCallback& callback) = 0; |
| 422 | |
| 423 // Sends an async IPC to open a file through filesystem API. | |
| 424 typedef base::Callback<void (base::PlatformFileError)> | |
| 425 NotifyCloseFileCallback; | |
| 426 typedef base::Callback< | |
|
yzshen1
2012/06/29 17:15:52
Please add a comment about how the callback(s) wor
kinaba
2012/07/03 06:46:35
Done.
| |
| 427 void (base::PlatformFileError, | |
| 428 base::PassPlatformFile, | |
| 429 const NotifyCloseFileCallback&)> AsyncOpenFileSystemURLCallback; | |
| 422 virtual bool AsyncOpenFileSystemURL( | 430 virtual bool AsyncOpenFileSystemURL( |
| 423 const GURL& path, | 431 const GURL& path, |
| 424 int flags, | 432 int flags, |
| 425 const AsyncOpenFileCallback& callback) = 0; | 433 const AsyncOpenFileSystemURLCallback& callback) = 0; |
| 426 | 434 |
| 427 virtual bool OpenFileSystem( | 435 virtual bool OpenFileSystem( |
| 428 const GURL& url, | 436 const GURL& url, |
| 429 fileapi::FileSystemType type, | 437 fileapi::FileSystemType type, |
| 430 long long size, | 438 long long size, |
| 431 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 439 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| 432 virtual bool MakeDirectory( | 440 virtual bool MakeDirectory( |
| 433 const GURL& path, | 441 const GURL& path, |
| 434 bool recursive, | 442 bool recursive, |
| 435 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; | 443 fileapi::FileSystemCallbackDispatcher* dispatcher) = 0; |
| (...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 648 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; | 656 virtual webkit_glue::ClipboardClient* CreateClipboardClient() const = 0; |
| 649 | 657 |
| 650 // Returns a Device ID | 658 // Returns a Device ID |
| 651 virtual std::string GetDeviceID() = 0; | 659 virtual std::string GetDeviceID() = 0; |
| 652 }; | 660 }; |
| 653 | 661 |
| 654 } // namespace ppapi | 662 } // namespace ppapi |
| 655 } // namespace webkit | 663 } // namespace webkit |
| 656 | 664 |
| 657 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ | 665 #endif // WEBKIT_PLUGINS_PPAPI_PLUGIN_DELEGATE_H_ |
| OLD | NEW |