Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ | |
| 6 #define PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "ppapi/c/private/ppb_flash_clipboard.h" | |
| 11 | |
| 12 namespace pp { | |
| 13 | |
| 14 class Instance; | |
| 15 | |
| 16 namespace flash { | |
| 17 | |
| 18 class FlashClipboard { | |
|
yzshen1
2012/01/13 22:08:09
I think the convention is to omit the 'Flash' part
| |
| 19 public: | |
| 20 // Returns true if the required interface is available. | |
| 21 static bool IsAvailable(); | |
| 22 | |
| 23 // Returns true if the given format is available from the given clipboard. | |
| 24 static bool IsFormatAvailable(Instance* instance, | |
| 25 PP_Flash_Clipboard_Type clipboard_type, | |
| 26 PP_Flash_Clipboard_Format format); | |
| 27 | |
| 28 // Returns true on success, in which case |text_out| will be filled with plain | |
| 29 // text read from the given clipboard. | |
| 30 static bool ReadPlainText(Instance* instance, | |
| 31 PP_Flash_Clipboard_Type clipboard_type, | |
| 32 std::string* text_out); | |
| 33 | |
| 34 // Returns true on success (it may fail if |text| is too big). | |
| 35 static bool WritePlainText(Instance* instance, | |
| 36 PP_Flash_Clipboard_Type clipboard_type, | |
| 37 const std::string& text); | |
| 38 }; | |
| 39 | |
| 40 } // namespace flash | |
| 41 } // namespace pp | |
| 42 | |
| 43 #endif // PPAPI_CPP_PRIVATE_FLASH_CLIPBOARD_H_ | |
| OLD | NEW |