Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 * found in the LICENSE file. | |
| 4 */ | |
| 5 | |
| 6 /** | |
| 7 * This file defines the private <code>PPB_Flash_Clipboard</code> API used by | |
| 8 * Pepper Flash for reading and writing to the clipboard. | |
| 9 */ | |
| 10 | |
| 11 label Chrome { | |
| 12 M17 = 3.0 | |
| 13 }; | |
| 14 | |
| 15 #inline c | |
| 16 /** | |
| 17 * The old version string for this interface, equivalent to version 3.0. | |
|
noelallen1
2011/11/14 21:33:37
One space too many on this comment block. See blo
viettrungluu
2011/11/14 21:37:59
Done.
| |
| 18 * TODO(viettrungluu): Remove this when enough time has passed. | |
| 19 * crbug.com/104184 | |
| 20 */ | |
| 21 #define PPB_FLASH_CLIPBOARD_INTERFACE_3_LEGACY "PPB_Flash_Clipboard;3" | |
| 22 #endinl | |
| 23 | |
| 24 /** | |
| 25 * This enumeration contains the types of clipboards that can be accessed. | |
| 26 * These types correspond to clipboard types in WebKit. | |
| 27 */ | |
| 28 [assert_size(4)] | |
| 29 enum PP_Flash_Clipboard_Type { | |
| 30 /** The standard clipboard. */ | |
| 31 PP_FLASH_CLIPBOARD_TYPE_STANDARD = 0, | |
| 32 /** The selection clipboard (e.g., on Linux). */ | |
| 33 PP_FLASH_CLIPBOARD_TYPE_SELECTION = 1, | |
| 34 /** The drag clipboard. */ | |
| 35 PP_FLASH_CLIPBOARD_TYPE_DRAG = 2 | |
| 36 }; | |
| 37 | |
| 38 /** | |
| 39 * This enumeration contains the supported clipboard data formats. | |
| 40 */ | |
| 41 [assert_size(4)] | |
| 42 enum PP_Flash_Clipboard_Format { | |
| 43 /** Indicates an invalid or unsupported clipboard data format. */ | |
| 44 PP_FLASH_CLIPBOARD_FORMAT_INVALID = 0, | |
| 45 /** Indicates plain text clipboard data. */ | |
| 46 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1, | |
| 47 /** Indicates HTML clipboard data. */ | |
| 48 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2 | |
| 49 }; | |
| 50 | |
| 51 /** | |
| 52 * The <code>PPB_Flash_Clipboard</code> interface contains pointers to functions | |
| 53 * used by Pepper Flash to access the clipboard. | |
| 54 * | |
| 55 * TODO(viettrungluu): Support more formats (e.g., HTML).... | |
| 56 */ | |
| 57 [version=3.0] | |
| 58 interface PPB_Flash_Clipboard { | |
| 59 /** | |
| 60 * Checks whether a given data format is available from the given clipboard. | |
| 61 * Returns true if the given format is available from the given clipboard. | |
| 62 */ | |
| 63 PP_Bool IsFormatAvailable( | |
| 64 [in] PP_Instance instance_id, | |
| 65 [in] PP_Flash_Clipboard_Type clipboard_type, | |
| 66 [in] PP_Flash_Clipboard_Format format); | |
| 67 | |
| 68 /** | |
| 69 * Reads plain text data from the clipboard. | |
| 70 */ | |
| 71 PP_Var ReadPlainText( | |
| 72 [in] PP_Instance instance_id, | |
| 73 [in] PP_Flash_Clipboard_Type clipboard_type); | |
| 74 | |
| 75 /** | |
| 76 * Writes plain text data to the clipboard. If <code>text</code> is too large, | |
| 77 * it will return <code>PP_ERROR_NOSPACE</code> and not write to the | |
| 78 * clipboard. | |
| 79 */ | |
| 80 int32_t WritePlainText( | |
| 81 [in] PP_Instance instance_id, | |
| 82 [in] PP_Flash_Clipboard_Type clipboard_type, | |
| 83 [in] PP_Var text); | |
| 84 }; | |
| OLD | NEW |