summaryrefslogtreecommitdiffstats
path: root/ppapi
diff options
context:
space:
mode:
authorviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 01:43:39 +0000
committerviettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-04 01:43:39 +0000
commitc5f29a5ef0ab3cf90faf97f7ae75cf14969fa2fa (patch)
tree641b0271adbe1ee51b398c38b54a6f66620be130 /ppapi
parent24fc860b86a539f884b65ebe7e7be5133d23ce20 (diff)
downloadchromium_src-c5f29a5ef0ab3cf90faf97f7ae75cf14969fa2fa.zip
chromium_src-c5f29a5ef0ab3cf90faf97f7ae75cf14969fa2fa.tar.gz
chromium_src-c5f29a5ef0ab3cf90faf97f7ae75cf14969fa2fa.tar.bz2
Pepper/Flapper: Add very basic clipboard support.
Note that this is a trusted private interface; we rely on Flash to do a user action check. BUG=none TEST=Trung can cut-and-paste in his Flapper Review URL: http://codereview.chromium.org/6611034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@76857 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi')
-rw-r--r--ppapi/c/private/ppb_flash_clipboard.h33
-rw-r--r--ppapi/c/private/ppb_flash_menu.h2
-rw-r--r--ppapi/ppapi_cpp.gypi2
3 files changed, 35 insertions, 2 deletions
diff --git a/ppapi/c/private/ppb_flash_clipboard.h b/ppapi/c/private/ppb_flash_clipboard.h
new file mode 100644
index 0000000..c16ae36
--- /dev/null
+++ b/ppapi/c/private/ppb_flash_clipboard.h
@@ -0,0 +1,33 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
+#define PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
+
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPB_FLASH_CLIPBOARD_INTERFACE "PPB_Flash_Clipboard;2"
+
+typedef enum {
+ PP_FLASH_CLIPBOARD_TYPE_STANDARD = 0,
+ PP_FLASH_CLIPBOARD_TYPE_SELECTION = 1,
+ PP_FLASH_CLIPBOARD_TYPE_DRAG = 2
+} PP_Flash_Clipboard_Type;
+
+struct PPB_Flash_Clipboard {
+ // Reads plain text data from the clipboard.
+ struct PP_Var (*ReadPlainText)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type);
+
+ // Writes plain text data to the clipboard. If |text| is too large, it will
+ // return |PP_ERROR_NOSPACE| (and not write to the clipboard).
+ int32_t (*WritePlainText)(PP_Instance instance_id,
+ PP_Flash_Clipboard_Type clipboard_type,
+ struct PP_Var text);
+
+ // TODO(vtl): More formats, a |IsFormatAvailable()|, ....
+};
+
+#endif // PPAPI_C_PRIVATE_PPB_FLASH_CLIPBOARD_H_
diff --git a/ppapi/c/private/ppb_flash_menu.h b/ppapi/c/private/ppb_flash_menu.h
index b9a0b95..7fc62e5 100644
--- a/ppapi/c/private/ppb_flash_menu.h
+++ b/ppapi/c/private/ppb_flash_menu.h
@@ -10,8 +10,6 @@
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_resource.h"
-// PPB_Flash -------------------------------------------------------------------
-
#define PPB_FLASH_MENU_INTERFACE "PPB_Flash_Menu;1"
struct PP_CompletionCallback;
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 36840d9..0724961 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -82,6 +82,8 @@
# Private interfaces.
'c/private/ppb_flash.h',
+ 'c/private/ppb_flash_clipboard.h',
+ 'c/private/ppb_flash_file.h',
'c/private/ppb_flash_menu.h',
'c/private/ppb_flash_net_connector.h',
'c/private/ppb_nacl_private.h',