Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(419)

Side by Side Diff: ppapi/c/private/ppb_flash_clipboard.h

Issue 6724010: Pepper/Flapper: Add IsFormatAvailable() to PPB_Flash_Clipboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ 5 #ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
6 #define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ 6 #define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
7 7
8 #include "ppapi/c/pp_bool.h"
8 #include "ppapi/c/pp_instance.h" 9 #include "ppapi/c/pp_instance.h"
9 #include "ppapi/c/pp_var.h" 10 #include "ppapi/c/pp_var.h"
10 11
11 #define PPB_FLASH_CLIPBOARD_INTERFACE "PPB_Flash_Clipboard;2" 12 #define PPB_FLASH_CLIPBOARD_INTERFACE "PPB_Flash_Clipboard;3"
12 13
13 typedef enum { 14 typedef enum {
14 PP_FLASH_CLIPBOARD_TYPE_STANDARD = 0, 15 PP_FLASH_CLIPBOARD_TYPE_STANDARD = 0,
15 PP_FLASH_CLIPBOARD_TYPE_SELECTION = 1, 16 PP_FLASH_CLIPBOARD_TYPE_SELECTION = 1,
16 PP_FLASH_CLIPBOARD_TYPE_DRAG = 2 17 PP_FLASH_CLIPBOARD_TYPE_DRAG = 2
17 } PP_Flash_Clipboard_Type; 18 } PP_Flash_Clipboard_Type;
18 19
20 typedef enum {
21 PP_FLASH_CLIPBOARD_FORMAT_INVALID = 0,
22 PP_FLASH_CLIPBOARD_FORMAT_PLAINTEXT = 1,
23 PP_FLASH_CLIPBOARD_FORMAT_HTML = 2
24 } PP_Flash_Clipboard_Format;
25
19 struct PPB_Flash_Clipboard { 26 struct PPB_Flash_Clipboard {
27 // Returns true if the given format is available from the given clipboard.
28 PP_Bool (*IsFormatAvailable)(PP_Instance instance_id,
29 PP_Flash_Clipboard_Type clipboard_type,
30 PP_Flash_Clipboard_Format format);
31
20 // Reads plain text data from the clipboard. 32 // Reads plain text data from the clipboard.
21 struct PP_Var (*ReadPlainText)(PP_Instance instance_id, 33 struct PP_Var (*ReadPlainText)(PP_Instance instance_id,
22 PP_Flash_Clipboard_Type clipboard_type); 34 PP_Flash_Clipboard_Type clipboard_type);
23 35
24 // Writes plain text data to the clipboard. If |text| is too large, it will 36 // Writes plain text data to the clipboard. If |text| is too large, it will
25 // return |PP_ERROR_NOSPACE| (and not write to the clipboard). 37 // return |PP_ERROR_NOSPACE| (and not write to the clipboard).
26 int32_t (*WritePlainText)(PP_Instance instance_id, 38 int32_t (*WritePlainText)(PP_Instance instance_id,
27 PP_Flash_Clipboard_Type clipboard_type, 39 PP_Flash_Clipboard_Type clipboard_type,
28 struct PP_Var text); 40 struct PP_Var text);
29 41
30 // TODO(vtl): More formats, a |IsFormatAvailable()|, .... 42 // TODO(vtl): More formats (e.g., HTML)....
31 }; 43 };
32 44
33 #endif // PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_ 45 #endif // PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
OLDNEW
« no previous file with comments | « no previous file | ppapi/proxy/ppapi_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698