summaryrefslogtreecommitdiffstats
path: root/ppapi/c
diff options
context:
space:
mode:
authorkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 11:40:25 +0000
committerkoz@chromium.org <koz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-06 11:40:25 +0000
commitec15840f7bc0a031f1476fb1da0c382604990e29 (patch)
treecacb834ff665c1fe8c5afb57586c9ba8a2e8e284 /ppapi/c
parentfbb9ee0842eaf89576930fdab88ead289dfb7bcf (diff)
downloadchromium_src-ec15840f7bc0a031f1476fb1da0c382604990e29.zip
chromium_src-ec15840f7bc0a031f1476fb1da0c382604990e29.tar.gz
chromium_src-ec15840f7bc0a031f1476fb1da0c382604990e29.tar.bz2
Proxy the PDF API to the PDF plugin.
This makes the Rotate Clockwise / Counterclockwise context menu items work. Review URL: https://codereview.chromium.org/142413006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249366 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ppapi/c')
-rw-r--r--ppapi/c/private/ppp_pdf.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/ppapi/c/private/ppp_pdf.h b/ppapi/c/private/ppp_pdf.h
new file mode 100644
index 0000000..144e95c
--- /dev/null
+++ b/ppapi/c/private/ppp_pdf.h
@@ -0,0 +1,34 @@
+// Copyright 2014 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_PPP_PDF_H_
+#define PPAPI_C_PRIVATE_PPP_PDF_H_
+
+#include "ppapi/c/pp_instance.h"
+#include "ppapi/c/pp_point.h"
+#include "ppapi/c/pp_var.h"
+
+#define PPP_PDF_INTERFACE_1 "PPP_Pdf;1"
+#define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1
+
+typedef enum {
+ // Rotates the page 90 degrees clockwise from its current orientation.
+ PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CW,
+ // Rotates the page 90 degrees counterclockwise from its current orientation.
+ PP_PRIVATEPAGETRANSFORMTYPE_ROTATE_90_CCW
+} PP_PrivatePageTransformType;
+PP_COMPILE_ASSERT_SIZE_IN_BYTES(PP_PrivatePageTransformType, 4);
+
+struct PPP_Pdf_1 {
+ // Returns an absolute URL if the position is over a link.
+ PP_Var (*GetLinkAtPosition)(PP_Instance instance,
+ PP_Point point);
+
+ // Requests that the plugin apply the given transform to its view.
+ void (*Transform)(PP_Instance instance, PP_PrivatePageTransformType type);
+};
+
+typedef PPP_Pdf_1 PPP_Pdf;
+
+#endif // PPAPI_C_PRIVATE_PPP_PDF_H_