1 /* 2 * Copyright (C) 2010 Patrick Gansterer <paroga@paroga.com> 3 * 4 * Redistribution and use in source and binary forms, with or without 5 * modification, are permitted provided that the following conditions 6 * are met: 7 * 1. Redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer. 9 * 2. Redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the 11 * documentation and/or other materials provided with the distribution. 12 * 13 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 16 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY 17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 20 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23 */ 24 25 #ifndef PlatformStrategiesWinCE_h 26 #define PlatformStrategiesWinCE_h 27 28 #include "CookiesStrategy.h" 29 #include "LocalizationStrategy.h" 30 #include "PlatformStrategies.h" 31 #include "PluginStrategy.h" 32 #include "VisitedLinkStrategy.h" 33 34 class PlatformStrategiesWinCE : public WebCore::PlatformStrategies, private WebCore::CookiesStrategy, private WebCore::PluginStrategy, private WebCore::LocalizationStrategy, private WebCore::VisitedLinkStrategy { 35 public: 36 static void initialize(); 37 38 private: 39 PlatformStrategiesWinCE(); 40 41 // WebCore::PlatformStrategies 42 virtual WebCore::CookiesStrategy* createCookiesStrategy(); 43 virtual WebCore::PluginStrategy* createPluginStrategy(); 44 virtual WebCore::LocalizationStrategy* createLocalizationStrategy(); 45 virtual WebCore::VisitedLinkStrategy* createVisitedLinkStrategy(); 46 47 // WebCore::CookiesStrategy 48 virtual void notifyCookiesChanged(); 49 50 // WebCore::PluginStrategy 51 virtual void refreshPlugins(); 52 virtual void getPluginInfo(const WebCore::Page*, Vector<WebCore::PluginInfo>&); 53 54 // WebCore::LocalizationStrategy 55 virtual WTF::String inputElementAltText(); 56 virtual WTF::String resetButtonDefaultLabel(); 57 virtual WTF::String searchableIndexIntroduction(); 58 virtual WTF::String submitButtonDefaultLabel(); 59 virtual WTF::String fileButtonChooseFileLabel(); 60 virtual WTF::String fileButtonNoFileSelectedLabel(); 61 virtual WTF::String defaultDetailsSummaryText(); 62 #if ENABLE(CONTEXT_MENUS) 63 virtual WTF::String contextMenuItemTagOpenLinkInNewWindow(); 64 virtual WTF::String contextMenuItemTagDownloadLinkToDisk(); 65 virtual WTF::String contextMenuItemTagCopyLinkToClipboard(); 66 virtual WTF::String contextMenuItemTagOpenImageInNewWindow(); 67 virtual WTF::String contextMenuItemTagDownloadImageToDisk(); 68 virtual WTF::String contextMenuItemTagCopyImageToClipboard(); 69 virtual WTF::String contextMenuItemTagOpenFrameInNewWindow(); 70 virtual WTF::String contextMenuItemTagCopy(); 71 virtual WTF::String contextMenuItemTagGoBack(); 72 virtual WTF::String contextMenuItemTagGoForward(); 73 virtual WTF::String contextMenuItemTagStop(); 74 virtual WTF::String contextMenuItemTagReload(); 75 virtual WTF::String contextMenuItemTagCut(); 76 virtual WTF::String contextMenuItemTagPaste(); 77 virtual WTF::String contextMenuItemTagNoGuessesFound(); 78 virtual WTF::String contextMenuItemTagIgnoreSpelling(); 79 virtual WTF::String contextMenuItemTagLearnSpelling(); 80 virtual WTF::String contextMenuItemTagSearchWeb(); 81 virtual WTF::String contextMenuItemTagLookUpInDictionary(const String&); 82 virtual WTF::String contextMenuItemTagOpenLink(); 83 virtual WTF::String contextMenuItemTagIgnoreGrammar(); 84 virtual WTF::String contextMenuItemTagSpellingMenu(); 85 virtual WTF::String contextMenuItemTagShowSpellingPanel(bool show); 86 virtual WTF::String contextMenuItemTagCheckSpelling(); 87 virtual WTF::String contextMenuItemTagCheckSpellingWhileTyping(); 88 virtual WTF::String contextMenuItemTagCheckGrammarWithSpelling(); 89 virtual WTF::String contextMenuItemTagFontMenu(); 90 virtual WTF::String contextMenuItemTagBold(); 91 virtual WTF::String contextMenuItemTagItalic(); 92 virtual WTF::String contextMenuItemTagUnderline(); 93 virtual WTF::String contextMenuItemTagOutline(); 94 virtual WTF::String contextMenuItemTagWritingDirectionMenu(); 95 virtual WTF::String contextMenuItemTagTextDirectionMenu(); 96 virtual WTF::String contextMenuItemTagDefaultDirection(); 97 virtual WTF::String contextMenuItemTagLeftToRight(); 98 virtual WTF::String contextMenuItemTagRightToLeft(); 99 virtual WTF::String contextMenuItemTagInspectElement(); 100 virtual WTF::String contextMenuItemTagOpenVideoInNewWindow(); 101 virtual WTF::String contextMenuItemTagOpenAudioInNewWindow(); 102 virtual WTF::String contextMenuItemTagCopyVideoLinkToClipboard(); 103 virtual WTF::String contextMenuItemTagCopyAudioLinkToClipboard(); 104 virtual WTF::String contextMenuItemTagToggleMediaControls(); 105 virtual WTF::String contextMenuItemTagToggleMediaLoop(); 106 virtual WTF::String contextMenuItemTagEnterVideoFullscreen(); 107 virtual WTF::String contextMenuItemTagMediaPlay(); 108 virtual WTF::String contextMenuItemTagMediaPause(); 109 virtual WTF::String contextMenuItemTagMediaMute(); 110 #endif // ENABLE(CONTEXT_MENUS) 111 virtual WTF::String searchMenuNoRecentSearchesText(); 112 virtual WTF::String searchMenuRecentSearchesText(); 113 virtual WTF::String searchMenuClearRecentSearchesText(); 114 virtual WTF::String AXWebAreaText(); 115 virtual WTF::String AXLinkText(); 116 virtual WTF::String AXListMarkerText(); 117 virtual WTF::String AXImageMapText(); 118 virtual WTF::String AXHeadingText(); 119 virtual WTF::String AXDefinitionListTermText(); 120 virtual WTF::String AXDefinitionListDefinitionText(); 121 virtual WTF::String AXButtonActionVerb(); 122 virtual WTF::String AXRadioButtonActionVerb(); 123 virtual WTF::String AXTextFieldActionVerb(); 124 virtual WTF::String AXCheckedCheckBoxActionVerb(); 125 virtual WTF::String AXUncheckedCheckBoxActionVerb(); 126 virtual WTF::String AXMenuListActionVerb(); 127 virtual WTF::String AXMenuListPopupActionVerb(); 128 virtual WTF::String AXLinkActionVerb(); 129 virtual WTF::String missingPluginText(); 130 virtual WTF::String crashedPluginText(); 131 virtual WTF::String multipleFileUploadText(unsigned numberOfFiles); 132 virtual WTF::String unknownFileSizeText(); 133 virtual WTF::String uploadFileText(); 134 virtual WTF::String allFilesText(); 135 virtual WTF::String imageTitle(const WTF::String& filename, const WebCore::IntSize&); 136 virtual WTF::String mediaElementLoadingStateText(); 137 virtual WTF::String mediaElementLiveBroadcastStateText(); 138 virtual WTF::String localizedMediaControlElementString(const WTF::String&); 139 virtual WTF::String localizedMediaControlElementHelpText(const WTF::String&); 140 virtual WTF::String localizedMediaTimeDescription(float); 141 virtual WTF::String validationMessageValueMissingText(); 142 virtual WTF::String validationMessageTypeMismatchText(); 143 virtual WTF::String validationMessagePatternMismatchText(); 144 virtual WTF::String validationMessageTooLongText(); 145 virtual WTF::String validationMessageRangeUnderflowText(); 146 virtual WTF::String validationMessageRangeOverflowText(); 147 virtual WTF::String validationMessageStepMismatchText(); 148 149 // WebCore::VisitedLinkStrategy 150 virtual bool isLinkVisited(WebCore::Page*, WebCore::LinkHash); 151 virtual void addVisitedLink(WebCore::Page*, WebCore::LinkHash); 152 }; 153 154 #endif // PlatformStrategiesWinCE_h 155