blob: acc8882cc0f50cef849dbe8b540e41179e070293 [file] [log] [blame]
// Copyright (c) 2010 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.
#include "build/build_config.h"
#include "pdf/accessibility_structs.h"
#include "pdf/pdf_engine.h"
#include "pdf/ppapi_migration/input_event_conversions.h"
#include "ppapi/c/pp_input_event.h"
#include "ppapi/c/private/ppb_pdf.h"
#include "ppapi/c/private/ppp_pdf.h"
#include "third_party/pdfium/public/fpdf_edit.h"
#include "third_party/pdfium/public/fpdf_formfill.h"
#include "third_party/pdfium/public/fpdf_fwlevent.h"
#include "third_party/pdfium/public/fpdf_sysfontinfo.h"
#include "third_party/pdfium/public/fpdfview.h"
#include "ui/events/keycodes/keyboard_codes.h"
#if defined(OS_WIN)
#include "pdf/pdf.h"
#endif
#define STATIC_ASSERT_ENUM(a, b) \
static_assert(static_cast<int>(a) == static_cast<int>(b), \
"mismatching enums: " #a)
// Enum asserts between PP_INPUTEVENT_MODIFIER* and InputEventModifier
// modifiers.
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_SHIFTKEY,
chrome_pdf::kInputEventModifierShiftKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_CONTROLKEY,
chrome_pdf::kInputEventModifierControlKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ALTKEY,
chrome_pdf::kInputEventModifierAltKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_METAKEY,
chrome_pdf::kInputEventModifierMetaKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISKEYPAD,
chrome_pdf::kInputEventModifierIsKeyPad);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISAUTOREPEAT,
chrome_pdf::kInputEventModifierIsAutoRepeat);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_LEFTBUTTONDOWN,
chrome_pdf::kInputEventModifierLeftButtonDown);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_MIDDLEBUTTONDOWN,
chrome_pdf::kInputEventModifierMiddleButtonDown);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_RIGHTBUTTONDOWN,
chrome_pdf::kInputEventModifierRightButtonDown);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_CAPSLOCKKEY,
chrome_pdf::kInputEventModifierCapsLockKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_NUMLOCKKEY,
chrome_pdf::kInputEventModifierNumLockKey);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISLEFT,
chrome_pdf::kInputEventModifierIsLeft);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISRIGHT,
chrome_pdf::kInputEventModifierIsRight);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISPEN,
chrome_pdf::kInputEventModifierIsPen);
STATIC_ASSERT_ENUM(PP_INPUTEVENT_MODIFIER_ISERASER,
chrome_pdf::kInputEventModifierIsEraser);
// Enum asserts between InputEventModifier and FWL_* modifiers.
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierShiftKey,
FWL_EVENTFLAG_ShiftKey);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierControlKey,
FWL_EVENTFLAG_ControlKey);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierAltKey, FWL_EVENTFLAG_AltKey);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierMetaKey,
FWL_EVENTFLAG_MetaKey);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierIsKeyPad,
FWL_EVENTFLAG_KeyPad);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierIsAutoRepeat,
FWL_EVENTFLAG_AutoRepeat);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierLeftButtonDown,
FWL_EVENTFLAG_LeftButtonDown);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierMiddleButtonDown,
FWL_EVENTFLAG_MiddleButtonDown);
STATIC_ASSERT_ENUM(chrome_pdf::kInputEventModifierRightButtonDown,
FWL_EVENTFLAG_RightButtonDown);
STATIC_ASSERT_ENUM(ui::VKEY_BACK, FWL_VKEY_Back);
STATIC_ASSERT_ENUM(ui::VKEY_TAB, FWL_VKEY_Tab);
STATIC_ASSERT_ENUM(ui::VKEY_CLEAR, FWL_VKEY_Clear);
STATIC_ASSERT_ENUM(ui::VKEY_RETURN, FWL_VKEY_Return);
STATIC_ASSERT_ENUM(ui::VKEY_SHIFT, FWL_VKEY_Shift);
STATIC_ASSERT_ENUM(ui::VKEY_CONTROL, FWL_VKEY_Control);
STATIC_ASSERT_ENUM(ui::VKEY_MENU, FWL_VKEY_Menu);
STATIC_ASSERT_ENUM(ui::VKEY_PAUSE, FWL_VKEY_Pause);
STATIC_ASSERT_ENUM(ui::VKEY_CAPITAL, FWL_VKEY_Capital);
STATIC_ASSERT_ENUM(ui::VKEY_KANA, FWL_VKEY_Kana);
STATIC_ASSERT_ENUM(ui::VKEY_HANGUL, FWL_VKEY_Hangul);
STATIC_ASSERT_ENUM(ui::VKEY_JUNJA, FWL_VKEY_Junja);
STATIC_ASSERT_ENUM(ui::VKEY_FINAL, FWL_VKEY_Final);
STATIC_ASSERT_ENUM(ui::VKEY_HANJA, FWL_VKEY_Hanja);
STATIC_ASSERT_ENUM(ui::VKEY_KANJI, FWL_VKEY_Kanji);
STATIC_ASSERT_ENUM(ui::VKEY_ESCAPE, FWL_VKEY_Escape);
STATIC_ASSERT_ENUM(ui::VKEY_CONVERT, FWL_VKEY_Convert);
STATIC_ASSERT_ENUM(ui::VKEY_NONCONVERT, FWL_VKEY_NonConvert);
STATIC_ASSERT_ENUM(ui::VKEY_ACCEPT, FWL_VKEY_Accept);
STATIC_ASSERT_ENUM(ui::VKEY_MODECHANGE, FWL_VKEY_ModeChange);
STATIC_ASSERT_ENUM(ui::VKEY_SPACE, FWL_VKEY_Space);
STATIC_ASSERT_ENUM(ui::VKEY_PRIOR, FWL_VKEY_Prior);
STATIC_ASSERT_ENUM(ui::VKEY_NEXT, FWL_VKEY_Next);
STATIC_ASSERT_ENUM(ui::VKEY_END, FWL_VKEY_End);
STATIC_ASSERT_ENUM(ui::VKEY_HOME, FWL_VKEY_Home);
STATIC_ASSERT_ENUM(ui::VKEY_LEFT, FWL_VKEY_Left);
STATIC_ASSERT_ENUM(ui::VKEY_UP, FWL_VKEY_Up);
STATIC_ASSERT_ENUM(ui::VKEY_RIGHT, FWL_VKEY_Right);
STATIC_ASSERT_ENUM(ui::VKEY_DOWN, FWL_VKEY_Down);
STATIC_ASSERT_ENUM(ui::VKEY_SELECT, FWL_VKEY_Select);
STATIC_ASSERT_ENUM(ui::VKEY_PRINT, FWL_VKEY_Print);
STATIC_ASSERT_ENUM(ui::VKEY_EXECUTE, FWL_VKEY_Execute);
STATIC_ASSERT_ENUM(ui::VKEY_SNAPSHOT, FWL_VKEY_Snapshot);
STATIC_ASSERT_ENUM(ui::VKEY_INSERT, FWL_VKEY_Insert);
STATIC_ASSERT_ENUM(ui::VKEY_DELETE, FWL_VKEY_Delete);
STATIC_ASSERT_ENUM(ui::VKEY_HELP, FWL_VKEY_Help);
STATIC_ASSERT_ENUM(ui::VKEY_0, FWL_VKEY_0);
STATIC_ASSERT_ENUM(ui::VKEY_1, FWL_VKEY_1);
STATIC_ASSERT_ENUM(ui::VKEY_2, FWL_VKEY_2);
STATIC_ASSERT_ENUM(ui::VKEY_3, FWL_VKEY_3);
STATIC_ASSERT_ENUM(ui::VKEY_4, FWL_VKEY_4);
STATIC_ASSERT_ENUM(ui::VKEY_5, FWL_VKEY_5);
STATIC_ASSERT_ENUM(ui::VKEY_6, FWL_VKEY_6);
STATIC_ASSERT_ENUM(ui::VKEY_7, FWL_VKEY_7);
STATIC_ASSERT_ENUM(ui::VKEY_8, FWL_VKEY_8);
STATIC_ASSERT_ENUM(ui::VKEY_9, FWL_VKEY_9);
STATIC_ASSERT_ENUM(ui::VKEY_A, FWL_VKEY_A);
STATIC_ASSERT_ENUM(ui::VKEY_B, FWL_VKEY_B);
STATIC_ASSERT_ENUM(ui::VKEY_C, FWL_VKEY_C);
STATIC_ASSERT_ENUM(ui::VKEY_D, FWL_VKEY_D);
STATIC_ASSERT_ENUM(ui::VKEY_E, FWL_VKEY_E);
STATIC_ASSERT_ENUM(ui::VKEY_F, FWL_VKEY_F);
STATIC_ASSERT_ENUM(ui::VKEY_G, FWL_VKEY_G);
STATIC_ASSERT_ENUM(ui::VKEY_H, FWL_VKEY_H);
STATIC_ASSERT_ENUM(ui::VKEY_I, FWL_VKEY_I);
STATIC_ASSERT_ENUM(ui::VKEY_J, FWL_VKEY_J);
STATIC_ASSERT_ENUM(ui::VKEY_K, FWL_VKEY_K);
STATIC_ASSERT_ENUM(ui::VKEY_L, FWL_VKEY_L);
STATIC_ASSERT_ENUM(ui::VKEY_M, FWL_VKEY_M);
STATIC_ASSERT_ENUM(ui::VKEY_N, FWL_VKEY_N);
STATIC_ASSERT_ENUM(ui::VKEY_O, FWL_VKEY_O);
STATIC_ASSERT_ENUM(ui::VKEY_P, FWL_VKEY_P);
STATIC_ASSERT_ENUM(ui::VKEY_Q, FWL_VKEY_Q);
STATIC_ASSERT_ENUM(ui::VKEY_R, FWL_VKEY_R);
STATIC_ASSERT_ENUM(ui::VKEY_S, FWL_VKEY_S);
STATIC_ASSERT_ENUM(ui::VKEY_T, FWL_VKEY_T);
STATIC_ASSERT_ENUM(ui::VKEY_U, FWL_VKEY_U);
STATIC_ASSERT_ENUM(ui::VKEY_V, FWL_VKEY_V);
STATIC_ASSERT_ENUM(ui::VKEY_W, FWL_VKEY_W);
STATIC_ASSERT_ENUM(ui::VKEY_X, FWL_VKEY_X);
STATIC_ASSERT_ENUM(ui::VKEY_Y, FWL_VKEY_Y);
STATIC_ASSERT_ENUM(ui::VKEY_Z, FWL_VKEY_Z);
STATIC_ASSERT_ENUM(ui::VKEY_LWIN, FWL_VKEY_LWin);
STATIC_ASSERT_ENUM(ui::VKEY_COMMAND, FWL_VKEY_Command);
STATIC_ASSERT_ENUM(ui::VKEY_RWIN, FWL_VKEY_RWin);
STATIC_ASSERT_ENUM(ui::VKEY_APPS, FWL_VKEY_Apps);
STATIC_ASSERT_ENUM(ui::VKEY_SLEEP, FWL_VKEY_Sleep);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD0, FWL_VKEY_NumPad0);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD1, FWL_VKEY_NumPad1);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD2, FWL_VKEY_NumPad2);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD3, FWL_VKEY_NumPad3);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD4, FWL_VKEY_NumPad4);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD5, FWL_VKEY_NumPad5);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD6, FWL_VKEY_NumPad6);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD7, FWL_VKEY_NumPad7);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD8, FWL_VKEY_NumPad8);
STATIC_ASSERT_ENUM(ui::VKEY_NUMPAD9, FWL_VKEY_NumPad9);
STATIC_ASSERT_ENUM(ui::VKEY_MULTIPLY, FWL_VKEY_Multiply);
STATIC_ASSERT_ENUM(ui::VKEY_ADD, FWL_VKEY_Add);
STATIC_ASSERT_ENUM(ui::VKEY_SEPARATOR, FWL_VKEY_Separator);
STATIC_ASSERT_ENUM(ui::VKEY_SUBTRACT, FWL_VKEY_Subtract);
STATIC_ASSERT_ENUM(ui::VKEY_DECIMAL, FWL_VKEY_Decimal);
STATIC_ASSERT_ENUM(ui::VKEY_DIVIDE, FWL_VKEY_Divide);
STATIC_ASSERT_ENUM(ui::VKEY_F1, FWL_VKEY_F1);
STATIC_ASSERT_ENUM(ui::VKEY_F2, FWL_VKEY_F2);
STATIC_ASSERT_ENUM(ui::VKEY_F3, FWL_VKEY_F3);
STATIC_ASSERT_ENUM(ui::VKEY_F4, FWL_VKEY_F4);
STATIC_ASSERT_ENUM(ui::VKEY_F5, FWL_VKEY_F5);
STATIC_ASSERT_ENUM(ui::VKEY_F6, FWL_VKEY_F6);
STATIC_ASSERT_ENUM(ui::VKEY_F7, FWL_VKEY_F7);
STATIC_ASSERT_ENUM(ui::VKEY_F8, FWL_VKEY_F8);
STATIC_ASSERT_ENUM(ui::VKEY_F9, FWL_VKEY_F9);
STATIC_ASSERT_ENUM(ui::VKEY_F10, FWL_VKEY_F10);
STATIC_ASSERT_ENUM(ui::VKEY_F11, FWL_VKEY_F11);
STATIC_ASSERT_ENUM(ui::VKEY_F12, FWL_VKEY_F12);
STATIC_ASSERT_ENUM(ui::VKEY_F13, FWL_VKEY_F13);
STATIC_ASSERT_ENUM(ui::VKEY_F14, FWL_VKEY_F14);
STATIC_ASSERT_ENUM(ui::VKEY_F15, FWL_VKEY_F15);
STATIC_ASSERT_ENUM(ui::VKEY_F16, FWL_VKEY_F16);
STATIC_ASSERT_ENUM(ui::VKEY_F17, FWL_VKEY_F17);
STATIC_ASSERT_ENUM(ui::VKEY_F18, FWL_VKEY_F18);
STATIC_ASSERT_ENUM(ui::VKEY_F19, FWL_VKEY_F19);
STATIC_ASSERT_ENUM(ui::VKEY_F20, FWL_VKEY_F20);
STATIC_ASSERT_ENUM(ui::VKEY_F21, FWL_VKEY_F21);
STATIC_ASSERT_ENUM(ui::VKEY_F22, FWL_VKEY_F22);
STATIC_ASSERT_ENUM(ui::VKEY_F23, FWL_VKEY_F23);
STATIC_ASSERT_ENUM(ui::VKEY_F24, FWL_VKEY_F24);
STATIC_ASSERT_ENUM(ui::VKEY_NUMLOCK, FWL_VKEY_NunLock);
STATIC_ASSERT_ENUM(ui::VKEY_SCROLL, FWL_VKEY_Scroll);
STATIC_ASSERT_ENUM(ui::VKEY_LSHIFT, FWL_VKEY_LShift);
STATIC_ASSERT_ENUM(ui::VKEY_RSHIFT, FWL_VKEY_RShift);
STATIC_ASSERT_ENUM(ui::VKEY_LCONTROL, FWL_VKEY_LControl);
STATIC_ASSERT_ENUM(ui::VKEY_RCONTROL, FWL_VKEY_RControl);
STATIC_ASSERT_ENUM(ui::VKEY_LMENU, FWL_VKEY_LMenu);
STATIC_ASSERT_ENUM(ui::VKEY_RMENU, FWL_VKEY_RMenu);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_BACK, FWL_VKEY_BROWSER_Back);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_FORWARD, FWL_VKEY_BROWSER_Forward);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_REFRESH, FWL_VKEY_BROWSER_Refresh);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_STOP, FWL_VKEY_BROWSER_Stop);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_SEARCH, FWL_VKEY_BROWSER_Search);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_FAVORITES, FWL_VKEY_BROWSER_Favorites);
STATIC_ASSERT_ENUM(ui::VKEY_BROWSER_HOME, FWL_VKEY_BROWSER_Home);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_MUTE, FWL_VKEY_VOLUME_Mute);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_DOWN, FWL_VKEY_VOLUME_Down);
STATIC_ASSERT_ENUM(ui::VKEY_VOLUME_UP, FWL_VKEY_VOLUME_Up);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_NEXT_TRACK, FWL_VKEY_MEDIA_NEXT_Track);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_PREV_TRACK, FWL_VKEY_MEDIA_PREV_Track);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_STOP, FWL_VKEY_MEDIA_Stop);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_PLAY_PAUSE, FWL_VKEY_MEDIA_PLAY_Pause);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_MAIL, FWL_VKEY_MEDIA_LAUNCH_Mail);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_MEDIA_SELECT,
FWL_VKEY_MEDIA_LAUNCH_MEDIA_Select);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_APP1, FWL_VKEY_MEDIA_LAUNCH_APP1);
STATIC_ASSERT_ENUM(ui::VKEY_MEDIA_LAUNCH_APP2, FWL_VKEY_MEDIA_LAUNCH_APP2);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_1, FWL_VKEY_OEM_1);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_PLUS, FWL_VKEY_OEM_Plus);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_COMMA, FWL_VKEY_OEM_Comma);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_MINUS, FWL_VKEY_OEM_Minus);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_PERIOD, FWL_VKEY_OEM_Period);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_2, FWL_VKEY_OEM_2);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_3, FWL_VKEY_OEM_3);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_4, FWL_VKEY_OEM_4);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_5, FWL_VKEY_OEM_5);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_6, FWL_VKEY_OEM_6);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_7, FWL_VKEY_OEM_7);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_8, FWL_VKEY_OEM_8);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_102, FWL_VKEY_OEM_102);
STATIC_ASSERT_ENUM(ui::VKEY_PROCESSKEY, FWL_VKEY_ProcessKey);
STATIC_ASSERT_ENUM(ui::VKEY_PACKET, FWL_VKEY_Packet);
STATIC_ASSERT_ENUM(ui::VKEY_ATTN, FWL_VKEY_Attn);
STATIC_ASSERT_ENUM(ui::VKEY_CRSEL, FWL_VKEY_Crsel);
STATIC_ASSERT_ENUM(ui::VKEY_EXSEL, FWL_VKEY_Exsel);
STATIC_ASSERT_ENUM(ui::VKEY_EREOF, FWL_VKEY_Ereof);
STATIC_ASSERT_ENUM(ui::VKEY_PLAY, FWL_VKEY_Play);
STATIC_ASSERT_ENUM(ui::VKEY_ZOOM, FWL_VKEY_Zoom);
STATIC_ASSERT_ENUM(ui::VKEY_NONAME, FWL_VKEY_NoName);
STATIC_ASSERT_ENUM(ui::VKEY_PA1, FWL_VKEY_PA1);
STATIC_ASSERT_ENUM(ui::VKEY_OEM_CLEAR, FWL_VKEY_OEM_Clear);
STATIC_ASSERT_ENUM(ui::VKEY_UNKNOWN, FWL_VKEY_Unknown);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_ANSI, FXFONT_ANSI_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_DEFAULT, FXFONT_DEFAULT_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_SYMBOL, FXFONT_SYMBOL_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_SHIFTJIS, FXFONT_SHIFTJIS_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_HANGUL, FXFONT_HANGEUL_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_GB2312, FXFONT_GB2312_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEFONTCHARSET_CHINESEBIG5,
FXFONT_CHINESEBIG5_CHARSET);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_NONE, DuplexUndefined);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_SIMPLEX, Simplex);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_SHORT_EDGE, DuplexFlipShortEdge);
STATIC_ASSERT_ENUM(PP_PRIVATEDUPLEXMODE_LONG_EDGE, DuplexFlipLongEdge);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_UNKNOWN, FPDF_TEXTRENDERMODE_UNKNOWN);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FIRST, FPDF_TEXTRENDERMODE_UNKNOWN);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILL, FPDF_TEXTRENDERMODE_FILL);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_STROKE, FPDF_TEXTRENDERMODE_STROKE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLSTROKE,
FPDF_TEXTRENDERMODE_FILL_STROKE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_INVISIBLE,
FPDF_TEXTRENDERMODE_INVISIBLE);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLCLIP,
FPDF_TEXTRENDERMODE_FILL_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_STROKECLIP,
FPDF_TEXTRENDERMODE_STROKE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_FILLSTROKECLIP,
FPDF_TEXTRENDERMODE_FILL_STROKE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_CLIP, FPDF_TEXTRENDERMODE_CLIP);
STATIC_ASSERT_ENUM(PP_TEXTRENDERINGMODE_LAST, FPDF_TEXTRENDERMODE_LAST);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kUnknown,
PP_TEXTRENDERINGMODE_UNKNOWN);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kFill,
PP_TEXTRENDERINGMODE_FILL);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kStroke,
PP_TEXTRENDERINGMODE_STROKE);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kFillStroke,
PP_TEXTRENDERINGMODE_FILLSTROKE);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kInvisible,
PP_TEXTRENDERINGMODE_INVISIBLE);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kFillClip,
PP_TEXTRENDERINGMODE_FILLCLIP);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kStrokeClip,
PP_TEXTRENDERINGMODE_STROKECLIP);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kFillStrokeClip,
PP_TEXTRENDERINGMODE_FILLSTROKECLIP);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kClip,
PP_TEXTRENDERINGMODE_CLIP);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextRenderMode::kMaxValue,
PP_TEXTRENDERINGMODE_LAST);
STATIC_ASSERT_ENUM(chrome_pdf::PDFEngine::FormType::kNone, FORMTYPE_NONE);
STATIC_ASSERT_ENUM(chrome_pdf::PDFEngine::FormType::kAcroForm,
FORMTYPE_ACRO_FORM);
STATIC_ASSERT_ENUM(chrome_pdf::PDFEngine::FormType::kXFAFull,
FORMTYPE_XFA_FULL);
STATIC_ASSERT_ENUM(chrome_pdf::PDFEngine::FormType::kXFAForeground,
FORMTYPE_XFA_FOREGROUND);
STATIC_ASSERT_ENUM(chrome_pdf::PDFEngine::FormType::kCount, FORMTYPE_COUNT);
STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_PUSHBUTTON, FPDF_FORMFIELD_PUSHBUTTON);
STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_CHECKBOX, FPDF_FORMFIELD_CHECKBOX);
STATIC_ASSERT_ENUM(PP_PRIVATEBUTTON_RADIOBUTTON, FPDF_FORMFIELD_RADIOBUTTON);
#if defined(OS_WIN)
STATIC_ASSERT_ENUM(chrome_pdf::kEmf, FPDF_PRINTMODE_EMF);
STATIC_ASSERT_ENUM(chrome_pdf::kTextOnly, FPDF_PRINTMODE_TEXTONLY);
STATIC_ASSERT_ENUM(chrome_pdf::kPostScript2, FPDF_PRINTMODE_POSTSCRIPT2);
STATIC_ASSERT_ENUM(chrome_pdf::kPostScript3, FPDF_PRINTMODE_POSTSCRIPT3);
STATIC_ASSERT_ENUM(chrome_pdf::kEmfWithReducedRasterization,
FPDF_PRINTMODE_EMF_IMAGE_MASKS);
#endif
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kNone,
PP_PRIVATEDIRECTION_NONE);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kLeftToRight,
PP_PRIVATEDIRECTION_LTR);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kRightToLeft,
PP_PRIVATEDIRECTION_RTL);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kTopToBottom,
PP_PRIVATEDIRECTION_TTB);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kBottomToTop,
PP_PRIVATEDIRECTION_BTT);
STATIC_ASSERT_ENUM(chrome_pdf::AccessibilityTextDirection::kMaxValue,
PP_PRIVATEDIRECTION_LAST);