tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2006 Eric Seidel <eric@webkit.org> |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 3 | * Copyright (C) 2008-2017 Apple Inc. All rights reserved. |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 4 | * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
| 5 | * |
| 6 | * Redistribution and use in source and binary forms, with or without |
| 7 | * modification, are permitted provided that the following conditions |
| 8 | * are met: |
| 9 | * 1. Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * 2. Redistributions in binary form must reproduce the above copyright |
| 12 | * notice, this list of conditions and the following disclaimer in the |
| 13 | * documentation and/or other materials provided with the distribution. |
| 14 | * |
| 15 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 16 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 17 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 18 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 19 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 20 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 21 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 22 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 23 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 25 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 | */ |
| 27 | |
| 28 | #include "config.h" |
| 29 | #include "EmptyClients.h" |
| 30 | |
andersca@apple.com | d81b5f1 | 2016-04-22 00:33:32 +0000 | [diff] [blame] | 31 | #include "ApplicationCacheStorage.h" |
andersca@apple.com | 4c59369 | 2016-10-14 17:14:39 +0000 | [diff] [blame] | 32 | #include "BackForwardClient.h" |
andersca@apple.com | 7d7200b | 2015-01-06 19:08:37 +0000 | [diff] [blame] | 33 | #include "ColorChooser.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 34 | #include "ContextMenuClient.h" |
andersca@apple.com | 7d7200b | 2015-01-06 19:08:37 +0000 | [diff] [blame] | 35 | #include "DatabaseProvider.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 36 | #include "DiagnosticLoggingClient.h" |
| 37 | #include "DocumentFragment.h" |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 38 | #include "DocumentLoader.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 39 | #include "DragClient.h" |
| 40 | #include "EditorClient.h" |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 41 | #include "FileChooser.h" |
| 42 | #include "FormState.h" |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 43 | #include "Frame.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 44 | #include "FrameLoaderClient.h" |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 45 | #include "FrameNetworkingContext.h" |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 46 | #include "HTMLFormElement.h" |
beidson@apple.com | 18db555 | 2015-09-28 22:44:42 +0000 | [diff] [blame] | 47 | #include "InProcessIDBServer.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 48 | #include "InspectorClient.h" |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 49 | #include "NetworkStorageSession.h" |
achristensen@apple.com | e594567 | 2016-06-13 21:58:53 +0000 | [diff] [blame] | 50 | #include "Page.h" |
jer.noble@apple.com | 9e0f060 | 2014-11-22 05:27:16 +0000 | [diff] [blame] | 51 | #include "PageConfiguration.h" |
andersca@apple.com | 4b16614 | 2016-06-22 20:00:03 +0000 | [diff] [blame] | 52 | #include "PaymentCoordinatorClient.h" |
andersca@apple.com | 531352c | 2016-08-08 23:43:50 +0000 | [diff] [blame] | 53 | #include "PluginInfoProvider.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 54 | #include "ProgressTrackerClient.h" |
ossy@webkit.org | 99ec90f | 2016-11-27 18:16:51 +0000 | [diff] [blame] | 55 | #include "SecurityOriginData.h" |
andersca@apple.com | 22319ce | 2014-12-11 02:35:06 +0000 | [diff] [blame] | 56 | #include "StorageArea.h" |
| 57 | #include "StorageNamespace.h" |
| 58 | #include "StorageNamespaceProvider.h" |
beidson@apple.com | aebe99b | 2017-03-31 19:27:52 +0000 | [diff] [blame] | 59 | #include "StorageType.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 60 | #include "TextCheckerClient.h" |
commit-queue@webkit.org | 7fb61bb | 2016-07-07 21:09:14 +0000 | [diff] [blame] | 61 | #include "ThreadableWebSocketChannel.h" |
weinig@apple.com | 1578a24 | 2016-03-15 00:48:40 +0000 | [diff] [blame] | 62 | #include "UserContentProvider.h" |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 63 | #include "VisitedLinkStore.h" |
fpizlo@apple.com | bc16ddb | 2016-09-06 01:02:22 +0000 | [diff] [blame] | 64 | #include <heap/HeapInlines.h> |
zandobersek@gmail.com | 58137de | 2013-10-22 20:16:49 +0000 | [diff] [blame] | 65 | #include <wtf/NeverDestroyed.h> |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 66 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 67 | #if ENABLE(CONTENT_EXTENSIONS) |
| 68 | #include "CompiledContentExtension.h" |
| 69 | #endif |
| 70 | |
aestes@apple.com | 7782774 | 2017-01-31 03:06:05 +0000 | [diff] [blame] | 71 | #if USE(QUICK_LOOK) |
aestes@apple.com | 756915c | 2017-03-22 18:11:08 +0000 | [diff] [blame] | 72 | #include "PreviewLoaderClient.h" |
aestes@apple.com | 7782774 | 2017-01-31 03:06:05 +0000 | [diff] [blame] | 73 | #endif |
| 74 | |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 75 | namespace WebCore { |
| 76 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 77 | class UserMessageHandlerDescriptor; |
andersca@apple.com | 9b0fd60 | 2016-09-21 22:51:52 +0000 | [diff] [blame] | 78 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 79 | class EmptyBackForwardClient final : public BackForwardClient { |
| 80 | void addItem(Ref<HistoryItem>&&) final { } |
| 81 | void goToItem(HistoryItem*) final { } |
| 82 | HistoryItem* itemAtIndex(int) final { return nullptr; } |
| 83 | int backListCount() final { return 0; } |
| 84 | int forwardListCount() final { return 0; } |
| 85 | void close() final { } |
andersca@apple.com | 4b16614 | 2016-06-22 20:00:03 +0000 | [diff] [blame] | 86 | }; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 87 | |
| 88 | #if ENABLE(CONTEXT_MENUS) |
| 89 | |
| 90 | class EmptyContextMenuClient final : public ContextMenuClient { |
| 91 | void contextMenuDestroyed() final { } |
| 92 | |
| 93 | void downloadURL(const URL&) final { } |
| 94 | void searchWithGoogle(const Frame*) final { } |
| 95 | void lookUpInDictionary(Frame*) final { } |
| 96 | bool isSpeaking() final { return false; } |
| 97 | void speak(const String&) final { } |
| 98 | void stopSpeaking() final { } |
| 99 | |
| 100 | #if PLATFORM(COCOA) |
| 101 | void searchWithSpotlight() final { } |
andersca@apple.com | 4b16614 | 2016-06-22 20:00:03 +0000 | [diff] [blame] | 102 | #endif |
| 103 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 104 | #if USE(ACCESSIBILITY_CONTEXT_MENUS) |
| 105 | void showContextMenu() final { } |
| 106 | #endif |
| 107 | }; |
| 108 | |
| 109 | #endif // ENABLE(CONTEXT_MENUS) |
| 110 | |
andersca@apple.com | 7d7200b | 2015-01-06 19:08:37 +0000 | [diff] [blame] | 111 | class EmptyDatabaseProvider final : public DatabaseProvider { |
| 112 | #if ENABLE(INDEXED_DATABASE) |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 113 | IDBClient::IDBConnectionToServer& idbConnectionToServerForSession(const SessionID&) final |
beidson@apple.com | 18db555 | 2015-09-28 22:44:42 +0000 | [diff] [blame] | 114 | { |
| 115 | static NeverDestroyed<Ref<InProcessIDBServer>> sharedConnection(InProcessIDBServer::create()); |
| 116 | return sharedConnection.get()->connectionToServer(); |
| 117 | } |
andersca@apple.com | 7d7200b | 2015-01-06 19:08:37 +0000 | [diff] [blame] | 118 | #endif |
| 119 | }; |
| 120 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 121 | class EmptyDiagnosticLoggingClient final : public DiagnosticLoggingClient { |
| 122 | void logDiagnosticMessage(const String&, const String&, ShouldSample) final { } |
| 123 | void logDiagnosticMessageWithResult(const String&, const String&, DiagnosticLoggingResultType, ShouldSample) final { } |
cdumez@apple.com | 172b890 | 2017-01-30 18:45:21 +0000 | [diff] [blame] | 124 | void logDiagnosticMessageWithValue(const String&, const String&, double, unsigned, ShouldSample) final { } |
cdumez@apple.com | eb4832c | 2017-02-08 15:39:38 +0000 | [diff] [blame] | 125 | void logDiagnosticMessageWithEnhancedPrivacy(const String&, const String&, ShouldSample) final { } |
andersca@apple.com | 531352c | 2016-08-08 23:43:50 +0000 | [diff] [blame] | 126 | }; |
| 127 | |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 128 | #if ENABLE(DRAG_SUPPORT) |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 129 | |
| 130 | class EmptyDragClient final : public DragClient { |
| 131 | void willPerformDragDestinationAction(DragDestinationAction, const DragData&) final { } |
| 132 | void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 133 | DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) final { return DragSourceActionNone; } |
andersca@apple.com | 346172f | 2017-02-15 18:31:00 +0000 | [diff] [blame] | 134 | void startDrag(DragImage, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, DragSourceAction) final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 135 | void dragControllerDestroyed() final { } |
| 136 | }; |
| 137 | |
| 138 | #endif // ENABLE(DRAG_SUPPORT) |
| 139 | |
| 140 | class EmptyEditorClient final : public EditorClient { |
| 141 | WTF_MAKE_FAST_ALLOCATED; |
| 142 | |
| 143 | public: |
| 144 | EmptyEditorClient() = default; |
| 145 | |
| 146 | private: |
| 147 | bool shouldDeleteRange(Range*) final { return false; } |
| 148 | bool smartInsertDeleteEnabled() final { return false; } |
achristensen@apple.com | 09e70aa | 2017-04-27 16:42:13 +0000 | [diff] [blame] | 149 | bool isSelectTrailingWhitespaceEnabled() const final { return false; } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 150 | bool isContinuousSpellCheckingEnabled() final { return false; } |
| 151 | void toggleContinuousSpellChecking() final { } |
| 152 | bool isGrammarCheckingEnabled() final { return false; } |
| 153 | void toggleGrammarChecking() final { } |
| 154 | int spellCheckerDocumentTag() final { return -1; } |
| 155 | |
| 156 | bool shouldBeginEditing(Range*) final { return false; } |
| 157 | bool shouldEndEditing(Range*) final { return false; } |
| 158 | bool shouldInsertNode(Node*, Range*, EditorInsertAction) final { return false; } |
| 159 | bool shouldInsertText(const String&, Range*, EditorInsertAction) final { return false; } |
| 160 | bool shouldChangeSelectedRange(Range*, Range*, EAffinity, bool) final { return false; } |
| 161 | |
| 162 | bool shouldApplyStyle(StyleProperties*, Range*) final { return false; } |
| 163 | void didApplyStyle() final { } |
| 164 | bool shouldMoveRangeAfterDelete(Range*, Range*) final { return false; } |
| 165 | |
| 166 | void didBeginEditing() final { } |
| 167 | void respondToChangedContents() final { } |
| 168 | void respondToChangedSelection(Frame*) final { } |
| 169 | void didChangeSelectionAndUpdateLayout() final { } |
| 170 | void updateEditorStateAfterLayoutIfEditabilityChanged() final { } |
| 171 | void discardedComposition(Frame*) final { } |
| 172 | void canceledComposition() final { } |
| 173 | void didEndEditing() final { } |
| 174 | void willWriteSelectionToPasteboard(Range*) final { } |
| 175 | void didWriteSelectionToPasteboard() final { } |
| 176 | void getClientPasteboardDataForRange(Range*, Vector<String>&, Vector<RefPtr<SharedBuffer>>&) final { } |
| 177 | void requestCandidatesForSelection(const VisibleSelection&) final { } |
| 178 | void handleAcceptedCandidateWithSoftSpaces(TextCheckingResult) final { } |
| 179 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 180 | void registerUndoStep(UndoStep&) final; |
| 181 | void registerRedoStep(UndoStep&) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 182 | void clearUndoRedoOperations() final { } |
| 183 | |
| 184 | bool canCopyCut(Frame*, bool defaultValue) const final { return defaultValue; } |
| 185 | bool canPaste(Frame*, bool defaultValue) const final { return defaultValue; } |
| 186 | bool canUndo() const final { return false; } |
| 187 | bool canRedo() const final { return false; } |
| 188 | |
| 189 | void undo() final { } |
| 190 | void redo() final { } |
| 191 | |
| 192 | void handleKeyboardEvent(KeyboardEvent*) final { } |
| 193 | void handleInputMethodKeydown(KeyboardEvent*) final { } |
| 194 | |
| 195 | void textFieldDidBeginEditing(Element*) final { } |
| 196 | void textFieldDidEndEditing(Element*) final { } |
| 197 | void textDidChangeInTextField(Element*) final { } |
| 198 | bool doTextFieldCommandFromEvent(Element*, KeyboardEvent*) final { return false; } |
| 199 | void textWillBeDeletedInTextField(Element*) final { } |
| 200 | void textDidChangeInTextArea(Element*) final { } |
| 201 | void overflowScrollPositionChanged() final { } |
| 202 | |
| 203 | #if PLATFORM(IOS) |
| 204 | void startDelayingAndCoalescingContentChangeNotifications() final { } |
| 205 | void stopDelayingAndCoalescingContentChangeNotifications() final { } |
| 206 | void writeDataToPasteboard(NSDictionary*) final { } |
| 207 | NSArray* supportedPasteboardTypesForCurrentSelection() final { return nullptr; } |
| 208 | NSArray* readDataFromPasteboard(NSString*, int) final { return nullptr; } |
| 209 | bool hasRichlyEditableSelection() final { return false; } |
| 210 | int getPasteboardItemsCount() final { return 0; } |
| 211 | RefPtr<DocumentFragment> documentFragmentFromDelegate(int) final { return nullptr; } |
| 212 | bool performsTwoStepPaste(DocumentFragment*) final { return false; } |
| 213 | int pasteboardChangeCount() final { return 0; } |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 214 | #endif |
| 215 | |
wenson_hsieh@apple.com | b88d30f | 2017-06-09 20:10:59 +0000 | [diff] [blame] | 216 | bool performTwoStepDrop(DocumentFragment&, Range&, bool) final { return false; } |
| 217 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 218 | #if PLATFORM(COCOA) |
| 219 | NSString *userVisibleString(NSURL *) final { return nullptr; } |
| 220 | void setInsertionPasteboard(const String&) final { }; |
| 221 | NSURL *canonicalizeURL(NSURL *) final { return nullptr; } |
| 222 | NSURL *canonicalizeURLString(NSString *) final { return nullptr; } |
| 223 | #endif |
akling@apple.com | 8e830e4 | 2013-08-26 17:54:33 +0000 | [diff] [blame] | 224 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 225 | #if USE(APPKIT) |
| 226 | void uppercaseWord() final { } |
| 227 | void lowercaseWord() final { } |
| 228 | void capitalizeWord() final { } |
| 229 | #endif |
jer.noble@apple.com | 9e0f060 | 2014-11-22 05:27:16 +0000 | [diff] [blame] | 230 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 231 | #if USE(AUTOMATIC_TEXT_REPLACEMENT) |
| 232 | void showSubstitutionsPanel(bool) final { } |
| 233 | bool substitutionsPanelIsShowing() final { return false; } |
| 234 | void toggleSmartInsertDelete() final { } |
| 235 | bool isAutomaticQuoteSubstitutionEnabled() final { return false; } |
| 236 | void toggleAutomaticQuoteSubstitution() final { } |
| 237 | bool isAutomaticLinkDetectionEnabled() final { return false; } |
| 238 | void toggleAutomaticLinkDetection() final { } |
| 239 | bool isAutomaticDashSubstitutionEnabled() final { return false; } |
| 240 | void toggleAutomaticDashSubstitution() final { } |
| 241 | bool isAutomaticTextReplacementEnabled() final { return false; } |
| 242 | void toggleAutomaticTextReplacement() final { } |
| 243 | bool isAutomaticSpellingCorrectionEnabled() final { return false; } |
| 244 | void toggleAutomaticSpellingCorrection() final { } |
| 245 | #endif |
jer.noble@apple.com | 9e0f060 | 2014-11-22 05:27:16 +0000 | [diff] [blame] | 246 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 247 | #if PLATFORM(GTK) |
| 248 | bool shouldShowUnicodeMenu() final { return false; } |
| 249 | #endif |
andersca@apple.com | 5782df8 | 2014-11-29 22:17:07 +0000 | [diff] [blame] | 250 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 251 | TextCheckerClient* textChecker() final { return &m_textCheckerClient; } |
| 252 | |
| 253 | void updateSpellingUIWithGrammarString(const String&, const GrammarDetail&) final { } |
| 254 | void updateSpellingUIWithMisspelledWord(const String&) final { } |
| 255 | void showSpellingUI(bool) final { } |
| 256 | bool spellingUIIsShowing() final { return false; } |
| 257 | |
| 258 | void willSetInputMethodState() final { } |
| 259 | void setInputMethodState(bool) final { } |
| 260 | |
| 261 | class EmptyTextCheckerClient final : public TextCheckerClient { |
| 262 | bool shouldEraseMarkersAfterChangeSelection(TextCheckingType) const final { return true; } |
| 263 | void ignoreWordInSpellDocument(const String&) final { } |
| 264 | void learnWord(const String&) final { } |
| 265 | void checkSpellingOfString(StringView, int*, int*) final { } |
| 266 | String getAutoCorrectSuggestionForMisspelledWord(const String&) final { return { }; } |
| 267 | void checkGrammarOfString(StringView, Vector<GrammarDetail>&, int*, int*) final { } |
| 268 | |
| 269 | #if USE(UNIFIED_TEXT_CHECKING) |
| 270 | Vector<TextCheckingResult> checkTextOfParagraph(StringView, TextCheckingTypeMask, const VisibleSelection&) final { return Vector<TextCheckingResult>(); } |
| 271 | #endif |
| 272 | |
| 273 | void getGuessesForWord(const String&, const String&, const VisibleSelection&, Vector<String>&) final { } |
| 274 | void requestCheckingOfString(TextCheckingRequest&, const VisibleSelection&) final; |
| 275 | }; |
| 276 | |
| 277 | EmptyTextCheckerClient m_textCheckerClient; |
| 278 | }; |
| 279 | |
| 280 | class EmptyFrameLoaderClient final : public FrameLoaderClient { |
| 281 | void frameLoaderDestroyed() final { } |
| 282 | |
| 283 | bool hasWebView() const final { return true; } // mainly for assertions |
| 284 | |
| 285 | void makeRepresentation(DocumentLoader*) final { } |
| 286 | #if PLATFORM(IOS) |
| 287 | bool forceLayoutOnRestoreFromPageCache() final { return false; } |
| 288 | #endif |
| 289 | void forceLayoutForNonHTML() final { } |
| 290 | |
| 291 | void setCopiesOnScroll() final { } |
| 292 | |
| 293 | void detachedFromParent2() final { } |
| 294 | void detachedFromParent3() final { } |
| 295 | |
| 296 | void convertMainResourceLoadToDownload(DocumentLoader*, SessionID, const ResourceRequest&, const ResourceResponse&) final { } |
| 297 | |
| 298 | void assignIdentifierToInitialRequest(unsigned long, DocumentLoader*, const ResourceRequest&) final { } |
| 299 | bool shouldUseCredentialStorage(DocumentLoader*, unsigned long) final { return false; } |
| 300 | void dispatchWillSendRequest(DocumentLoader*, unsigned long, ResourceRequest&, const ResourceResponse&) final { } |
| 301 | void dispatchDidReceiveAuthenticationChallenge(DocumentLoader*, unsigned long, const AuthenticationChallenge&) final { } |
| 302 | #if USE(PROTECTION_SPACE_AUTH_CALLBACK) |
| 303 | bool canAuthenticateAgainstProtectionSpace(DocumentLoader*, unsigned long, const ProtectionSpace&) final { return false; } |
| 304 | #endif |
| 305 | |
| 306 | #if PLATFORM(IOS) |
| 307 | RetainPtr<CFDictionaryRef> connectionProperties(DocumentLoader*, unsigned long) final { return nullptr; } |
| 308 | #endif |
| 309 | |
| 310 | void dispatchDidReceiveResponse(DocumentLoader*, unsigned long, const ResourceResponse&) final { } |
| 311 | void dispatchDidReceiveContentLength(DocumentLoader*, unsigned long, int) final { } |
| 312 | void dispatchDidFinishLoading(DocumentLoader*, unsigned long) final { } |
| 313 | #if ENABLE(DATA_DETECTION) |
| 314 | void dispatchDidFinishDataDetection(NSArray *) final { } |
| 315 | #endif |
| 316 | void dispatchDidFailLoading(DocumentLoader*, unsigned long, const ResourceError&) final { } |
| 317 | bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int) final { return false; } |
| 318 | |
| 319 | void dispatchDidDispatchOnloadEvents() final { } |
| 320 | void dispatchDidReceiveServerRedirectForProvisionalLoad() final { } |
| 321 | void dispatchDidCancelClientRedirect() final { } |
| 322 | void dispatchWillPerformClientRedirect(const URL&, double, double) final { } |
| 323 | void dispatchDidChangeLocationWithinPage() final { } |
| 324 | void dispatchDidPushStateWithinPage() final { } |
| 325 | void dispatchDidReplaceStateWithinPage() final { } |
| 326 | void dispatchDidPopStateWithinPage() final { } |
| 327 | void dispatchWillClose() final { } |
| 328 | void dispatchDidReceiveIcon() final { } |
| 329 | void dispatchDidStartProvisionalLoad() final { } |
| 330 | void dispatchDidReceiveTitle(const StringWithDirection&) final { } |
| 331 | void dispatchDidCommitLoad(std::optional<HasInsecureContent>) final { } |
| 332 | void dispatchDidFailProvisionalLoad(const ResourceError&) final { } |
| 333 | void dispatchDidFailLoad(const ResourceError&) final { } |
| 334 | void dispatchDidFinishDocumentLoad() final { } |
| 335 | void dispatchDidFinishLoad() final { } |
| 336 | void dispatchDidReachLayoutMilestone(LayoutMilestones) final { } |
| 337 | |
| 338 | Frame* dispatchCreatePage(const NavigationAction&) final { return nullptr; } |
| 339 | void dispatchShow() final { } |
| 340 | |
| 341 | void dispatchDecidePolicyForResponse(const ResourceResponse&, const ResourceRequest&, FramePolicyFunction) final { } |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 342 | void dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, FormState*, const String&, FramePolicyFunction) final; |
| 343 | void dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, FormState*, FramePolicyFunction) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 344 | void cancelPolicyCheck() final { } |
| 345 | |
| 346 | void dispatchUnableToImplementPolicy(const ResourceError&) final { } |
| 347 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 348 | void dispatchWillSendSubmitEvent(Ref<FormState>&&) final; |
| 349 | void dispatchWillSubmitForm(FormState&, FramePolicyFunction) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 350 | |
| 351 | void revertToProvisionalState(DocumentLoader*) final { } |
| 352 | void setMainDocumentError(DocumentLoader*, const ResourceError&) final { } |
| 353 | |
| 354 | void setMainFrameDocumentReady(bool) final { } |
| 355 | |
| 356 | void startDownload(const ResourceRequest&, const String&) final { } |
| 357 | |
| 358 | void willChangeTitle(DocumentLoader*) final { } |
| 359 | void didChangeTitle(DocumentLoader*) final { } |
| 360 | |
| 361 | void willReplaceMultipartContent() final { } |
| 362 | void didReplaceMultipartContent() final { } |
| 363 | |
| 364 | void committedLoad(DocumentLoader*, const char*, int) final { } |
| 365 | void finishedLoading(DocumentLoader*) final { } |
| 366 | |
| 367 | ResourceError cancelledError(const ResourceRequest&) final { return { ResourceError::Type::Cancellation }; } |
| 368 | ResourceError blockedError(const ResourceRequest&) final { return { }; } |
| 369 | ResourceError blockedByContentBlockerError(const ResourceRequest&) final { return { }; } |
| 370 | ResourceError cannotShowURLError(const ResourceRequest&) final { return { }; } |
| 371 | ResourceError interruptedForPolicyChangeError(const ResourceRequest&) final { return { }; } |
| 372 | #if ENABLE(CONTENT_FILTERING) |
| 373 | ResourceError blockedByContentFilterError(const ResourceRequest&) final { return { }; } |
| 374 | #endif |
| 375 | |
| 376 | ResourceError cannotShowMIMETypeError(const ResourceResponse&) final { return { }; } |
| 377 | ResourceError fileDoesNotExistError(const ResourceResponse&) final { return { }; } |
| 378 | ResourceError pluginWillHandleLoadError(const ResourceResponse&) final { return { }; } |
| 379 | |
| 380 | bool shouldFallBack(const ResourceError&) final { return false; } |
| 381 | |
| 382 | bool canHandleRequest(const ResourceRequest&) const final { return false; } |
| 383 | bool canShowMIMEType(const String&) const final { return false; } |
| 384 | bool canShowMIMETypeAsHTML(const String&) const final { return false; } |
| 385 | bool representationExistsForURLScheme(const String&) const final { return false; } |
| 386 | String generatedMIMETypeForURLScheme(const String&) const final { return emptyString(); } |
| 387 | |
| 388 | void frameLoadCompleted() final { } |
| 389 | void restoreViewState() final { } |
| 390 | void provisionalLoadStarted() final { } |
| 391 | void didFinishLoad() final { } |
| 392 | void prepareForDataSourceReplacement() final { } |
| 393 | |
| 394 | Ref<DocumentLoader> createDocumentLoader(const ResourceRequest&, const SubstituteData&) final; |
| 395 | void updateCachedDocumentLoader(DocumentLoader&) final { } |
| 396 | void setTitle(const StringWithDirection&, const URL&) final { } |
| 397 | |
| 398 | String userAgent(const URL&) final { return emptyString(); } |
| 399 | |
| 400 | void savePlatformDataToCachedFrame(CachedFrame*) final { } |
| 401 | void transitionToCommittedFromCachedFrame(CachedFrame*) final { } |
| 402 | #if PLATFORM(IOS) |
| 403 | void didRestoreFrameHierarchyForCachedFrame() final { } |
| 404 | #endif |
| 405 | void transitionToCommittedForNewPage() final { } |
| 406 | |
| 407 | void didSaveToPageCache() final { } |
| 408 | void didRestoreFromPageCache() final { } |
| 409 | |
| 410 | void dispatchDidBecomeFrameset(bool) final { } |
| 411 | |
| 412 | void updateGlobalHistory() final { } |
| 413 | void updateGlobalHistoryRedirectLinks() final { } |
| 414 | bool shouldGoToHistoryItem(HistoryItem*) const final { return false; } |
| 415 | void updateGlobalHistoryItemForPage() final { } |
| 416 | void saveViewStateToItem(HistoryItem&) final { } |
| 417 | bool canCachePage() const final { return false; } |
| 418 | void didDisplayInsecureContent() final { } |
akling@apple.com | 6be0e97 | 2017-01-18 19:35:49 +0000 | [diff] [blame] | 419 | void didRunInsecureContent(SecurityOrigin&, const URL&) final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 420 | void didDetectXSS(const URL&, bool) final { } |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 421 | RefPtr<Frame> createFrame(const URL&, const String&, HTMLFrameOwnerElement&, const String&, bool, int, int) final; |
| 422 | RefPtr<Widget> createPlugin(const IntSize&, HTMLPlugInElement&, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 423 | void recreatePlugin(Widget*) final; |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 424 | RefPtr<Widget> createJavaAppletWidget(const IntSize&, HTMLAppletElement&, const URL&, const Vector<String>&, const Vector<String>&) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 425 | |
| 426 | ObjectContentType objectContentType(const URL&, const String&) final { return ObjectContentType::None; } |
| 427 | String overrideMediaType() const final { return { }; } |
| 428 | |
commit-queue@webkit.org | 6c0b351 | 2017-02-17 02:40:21 +0000 | [diff] [blame] | 429 | void redirectDataToPlugin(Widget&) final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 430 | void dispatchDidClearWindowObjectInWorld(DOMWrapperWorld&) final { } |
| 431 | |
| 432 | void registerForIconNotification(bool) final { } |
| 433 | |
| 434 | #if PLATFORM(COCOA) |
| 435 | RemoteAXObjectRef accessibilityRemoteObject() final { return nullptr; } |
| 436 | NSCachedURLResponse *willCacheResponse(DocumentLoader*, unsigned long, NSCachedURLResponse *response) const final { return response; } |
| 437 | #endif |
| 438 | |
| 439 | #if PLATFORM(WIN) && USE(CFURLCONNECTION) |
| 440 | bool shouldCacheResponse(DocumentLoader*, unsigned long, const ResourceResponse&, const unsigned char*, unsigned long long) final { return true; } |
| 441 | #endif |
| 442 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 443 | Ref<FrameNetworkingContext> createNetworkingContext() final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 444 | |
| 445 | #if ENABLE(REQUEST_AUTOCOMPLETE) |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 446 | void didRequestAutocomplete(Ref<FormState>&&) final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 447 | #endif |
| 448 | |
| 449 | bool isEmptyFrameLoaderClient() final { return true; } |
| 450 | void prefetchDNS(const String&) final { } |
aestes@apple.com | 7782774 | 2017-01-31 03:06:05 +0000 | [diff] [blame] | 451 | |
| 452 | #if USE(QUICK_LOOK) |
aestes@apple.com | 756915c | 2017-03-22 18:11:08 +0000 | [diff] [blame] | 453 | RefPtr<PreviewLoaderClient> createPreviewLoaderClient(const String&, const String&) final { return nullptr; } |
aestes@apple.com | 7782774 | 2017-01-31 03:06:05 +0000 | [diff] [blame] | 454 | #endif |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 455 | }; |
| 456 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 457 | class EmptyFrameNetworkingContext final : public FrameNetworkingContext { |
| 458 | public: |
| 459 | static Ref<EmptyFrameNetworkingContext> create() { return adoptRef(*new EmptyFrameNetworkingContext); } |
| 460 | |
| 461 | private: |
| 462 | EmptyFrameNetworkingContext(); |
| 463 | |
| 464 | bool shouldClearReferrerOnHTTPSToHTTPRedirect() const { return true; } |
| 465 | NetworkStorageSession& storageSession() const final { return NetworkStorageSession::defaultStorageSession(); } |
| 466 | |
| 467 | #if PLATFORM(COCOA) |
| 468 | bool localFileContentSniffingEnabled() const { return false; } |
| 469 | SchedulePairHashSet* scheduledRunLoopPairs() const { return nullptr; } |
| 470 | RetainPtr<CFDataRef> sourceApplicationAuditData() const { return nullptr; }; |
| 471 | #endif |
| 472 | |
| 473 | #if PLATFORM(COCOA) || PLATFORM(WIN) |
| 474 | ResourceError blockedError(const ResourceRequest&) const final { return { }; } |
| 475 | #endif |
| 476 | }; |
| 477 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 478 | class EmptyInspectorClient final : public InspectorClient { |
| 479 | void inspectedPageDestroyed() final { } |
| 480 | Inspector::FrontendChannel* openLocalFrontend(InspectorController*) final { return nullptr; } |
| 481 | void bringFrontendToFront() final { } |
| 482 | void highlight() final { } |
| 483 | void hideHighlight() final { } |
| 484 | }; |
| 485 | |
| 486 | #if ENABLE(APPLE_PAY) |
| 487 | |
| 488 | class EmptyPaymentCoordinatorClient final : public PaymentCoordinatorClient { |
| 489 | bool supportsVersion(unsigned) final { return false; } |
| 490 | bool canMakePayments() final { return false; } |
| 491 | void canMakePaymentsWithActiveCard(const String&, const String&, std::function<void(bool)> completionHandler) final { callOnMainThread([completionHandler] { completionHandler(false); }); } |
| 492 | void openPaymentSetup(const String&, const String&, std::function<void(bool)> completionHandler) final { callOnMainThread([completionHandler] { completionHandler(false); }); } |
| 493 | bool showPaymentUI(const URL&, const Vector<URL>&, const PaymentRequest&) final { return false; } |
| 494 | void completeMerchantValidation(const PaymentMerchantSession&) final { } |
andersca@apple.com | 78a3d27 | 2017-03-08 22:56:22 +0000 | [diff] [blame] | 495 | void completeShippingMethodSelection(std::optional<ShippingMethodUpdate>&&) final { } |
| 496 | void completeShippingContactSelection(std::optional<ShippingContactUpdate>&&) final { } |
| 497 | void completePaymentMethodSelection(std::optional<PaymentMethodUpdate>&&) final { } |
| 498 | void completePaymentSession(std::optional<PaymentAuthorizationResult>&&) final { } |
andersca@apple.com | 44fddbd | 2017-04-19 23:30:47 +0000 | [diff] [blame] | 499 | void cancelPaymentSession() final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 500 | void abortPaymentSession() final { } |
| 501 | void paymentCoordinatorDestroyed() final { } |
| 502 | }; |
| 503 | |
| 504 | #endif |
| 505 | |
| 506 | class EmptyPluginInfoProvider final : public PluginInfoProvider { |
| 507 | void refreshPlugins() final { }; |
| 508 | void getPluginInfo(Page&, Vector<PluginInfo>&) final { } |
| 509 | void getWebVisiblePluginInfo(Page&, Vector<PluginInfo>&) final { } |
| 510 | }; |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 511 | |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 512 | class EmptyPopupMenu : public PopupMenu { |
| 513 | public: |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 514 | EmptyPopupMenu() = default; |
| 515 | private: |
| 516 | void show(const IntRect&, FrameView*, int) final { } |
| 517 | void hide() final { } |
| 518 | void updateFromElement() final { } |
| 519 | void disconnectClient() final { } |
| 520 | }; |
| 521 | |
| 522 | class EmptyProgressTrackerClient final : public ProgressTrackerClient { |
| 523 | void willChangeEstimatedProgress() final { } |
| 524 | void didChangeEstimatedProgress() final { } |
| 525 | void progressStarted(Frame&) final { } |
| 526 | void progressEstimateChanged(Frame&) final { } |
| 527 | void progressFinished(Frame&) final { } |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 528 | }; |
| 529 | |
| 530 | class EmptySearchPopupMenu : public SearchPopupMenu { |
| 531 | public: |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 532 | EmptySearchPopupMenu() |
| 533 | : m_popup(adoptRef(*new EmptyPopupMenu)) |
| 534 | { |
| 535 | } |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 536 | |
| 537 | private: |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 538 | PopupMenu* popupMenu() final { return m_popup.ptr(); } |
| 539 | void saveRecentSearches(const AtomicString&, const Vector<RecentSearch>&) final { } |
| 540 | void loadRecentSearches(const AtomicString&, Vector<RecentSearch>&) final { } |
| 541 | bool enabled() final { return false; } |
| 542 | |
| 543 | Ref<EmptyPopupMenu> m_popup; |
| 544 | }; |
| 545 | |
| 546 | class EmptyStorageNamespaceProvider final : public StorageNamespaceProvider { |
| 547 | struct EmptyStorageArea : public StorageArea { |
| 548 | unsigned length() final { return 0; } |
| 549 | String key(unsigned) final { return { }; } |
| 550 | String item(const String&) final { return { }; } |
| 551 | void setItem(Frame*, const String&, const String&, bool&) final { } |
| 552 | void removeItem(Frame*, const String&) final { } |
| 553 | void clear(Frame*) final { } |
| 554 | bool contains(const String&) final { return false; } |
| 555 | bool canAccessStorage(Frame*) final { return false; } |
beidson@apple.com | aebe99b | 2017-03-31 19:27:52 +0000 | [diff] [blame] | 556 | StorageType storageType() const final { return StorageType::Local; } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 557 | size_t memoryBytesUsedByCache() final { return 0; } |
| 558 | SecurityOriginData securityOrigin() const final { return { }; } |
| 559 | }; |
| 560 | |
| 561 | struct EmptyStorageNamespace final : public StorageNamespace { |
| 562 | RefPtr<StorageArea> storageArea(const SecurityOriginData&) final { return adoptRef(*new EmptyStorageArea); } |
| 563 | RefPtr<StorageNamespace> copy(Page*) final { return adoptRef(*new EmptyStorageNamespace); } |
| 564 | }; |
| 565 | |
| 566 | RefPtr<StorageNamespace> createSessionStorageNamespace(Page&, unsigned) final; |
| 567 | RefPtr<StorageNamespace> createLocalStorageNamespace(unsigned) final; |
beidson@apple.com | 6fc12ef | 2017-04-13 06:38:19 +0000 | [diff] [blame] | 568 | RefPtr<StorageNamespace> createEphemeralLocalStorageNamespace(Page&, unsigned) final; |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 569 | RefPtr<StorageNamespace> createTransientLocalStorageNamespace(SecurityOrigin&, unsigned) final; |
| 570 | }; |
| 571 | |
| 572 | class EmptyUserContentProvider final : public UserContentProvider { |
commit-queue@webkit.org | 0e0b856 | 2017-04-26 21:40:49 +0000 | [diff] [blame] | 573 | void forEachUserScript(Function<void(DOMWrapperWorld&, const UserScript&)>&&) const final { } |
| 574 | void forEachUserStyleSheet(Function<void(const UserStyleSheet&)>&&) const final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 575 | #if ENABLE(USER_MESSAGE_HANDLERS) |
commit-queue@webkit.org | 0e0b856 | 2017-04-26 21:40:49 +0000 | [diff] [blame] | 576 | void forEachUserMessageHandler(Function<void(const UserMessageHandlerDescriptor&)>&&) const final { } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 577 | #endif |
| 578 | #if ENABLE(CONTENT_EXTENSIONS) |
| 579 | ContentExtensions::ContentExtensionsBackend& userContentExtensionBackend() final { static NeverDestroyed<ContentExtensions::ContentExtensionsBackend> backend; return backend.get(); }; |
| 580 | #endif |
| 581 | }; |
| 582 | |
| 583 | class EmptyVisitedLinkStore final : public VisitedLinkStore { |
| 584 | bool isLinkVisited(Page&, LinkHash, const URL&, const AtomicString&) final { return false; } |
| 585 | void addVisitedLink(Page&, LinkHash) final { } |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 586 | }; |
| 587 | |
darin@apple.com | 9ace801 | 2017-01-23 06:24:18 +0000 | [diff] [blame] | 588 | RefPtr<PopupMenu> EmptyChromeClient::createPopupMenu(PopupMenuClient&) const |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 589 | { |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 590 | return adoptRef(*new EmptyPopupMenu); |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 591 | } |
| 592 | |
darin@apple.com | 9ace801 | 2017-01-23 06:24:18 +0000 | [diff] [blame] | 593 | RefPtr<SearchPopupMenu> EmptyChromeClient::createSearchPopupMenu(PopupMenuClient&) const |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 594 | { |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 595 | return adoptRef(*new EmptySearchPopupMenu); |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 596 | } |
| 597 | |
| 598 | #if ENABLE(INPUT_TYPE_COLOR) |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 599 | |
darin@apple.com | 9ace801 | 2017-01-23 06:24:18 +0000 | [diff] [blame] | 600 | std::unique_ptr<ColorChooser> EmptyChromeClient::createColorChooser(ColorChooserClient&, const Color&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 601 | { |
| 602 | return nullptr; |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 603 | } |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 604 | |
tkent@chromium.org | a1b5227 | 2012-04-11 02:27:01 +0000 | [diff] [blame] | 605 | #endif |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 606 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 607 | void EmptyChromeClient::runOpenPanel(Frame&, FileChooser&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 608 | { |
| 609 | } |
| 610 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 611 | void EmptyFrameLoaderClient::dispatchDecidePolicyForNewWindowAction(const NavigationAction&, const ResourceRequest&, FormState*, const String&, FramePolicyFunction) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 612 | { |
| 613 | } |
| 614 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 615 | void EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction(const NavigationAction&, const ResourceRequest&, FormState*, FramePolicyFunction) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 616 | { |
| 617 | } |
| 618 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 619 | void EmptyFrameLoaderClient::dispatchWillSendSubmitEvent(Ref<FormState>&&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 620 | { |
| 621 | } |
| 622 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 623 | void EmptyFrameLoaderClient::dispatchWillSubmitForm(FormState&, FramePolicyFunction) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 624 | { |
| 625 | } |
| 626 | |
gyuyoung.kim@webkit.org | c39073e | 2015-07-19 00:16:50 +0000 | [diff] [blame] | 627 | Ref<DocumentLoader> EmptyFrameLoaderClient::createDocumentLoader(const ResourceRequest& request, const SubstituteData& substituteData) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 628 | { |
| 629 | return DocumentLoader::create(request, substituteData); |
| 630 | } |
| 631 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 632 | RefPtr<Frame> EmptyFrameLoaderClient::createFrame(const URL&, const String&, HTMLFrameOwnerElement&, const String&, bool, int, int) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 633 | { |
gyuyoung.kim@webkit.org | c39073e | 2015-07-19 00:16:50 +0000 | [diff] [blame] | 634 | return nullptr; |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 635 | } |
| 636 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 637 | RefPtr<Widget> EmptyFrameLoaderClient::createPlugin(const IntSize&, HTMLPlugInElement&, const URL&, const Vector<String>&, const Vector<String>&, const String&, bool) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 638 | { |
gyuyoung.kim@webkit.org | c39073e | 2015-07-19 00:16:50 +0000 | [diff] [blame] | 639 | return nullptr; |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 640 | } |
| 641 | |
jonlee@apple.com | 1c74e39 | 2012-10-10 23:23:13 +0000 | [diff] [blame] | 642 | void EmptyFrameLoaderClient::recreatePlugin(Widget*) |
| 643 | { |
| 644 | } |
| 645 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 646 | RefPtr<Widget> EmptyFrameLoaderClient::createJavaAppletWidget(const IntSize&, HTMLAppletElement&, const URL&, const Vector<String>&, const Vector<String>&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 647 | { |
hs85.jeong@samsung.com | 1317914 | 2015-10-21 02:12:32 +0000 | [diff] [blame] | 648 | return nullptr; |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 649 | } |
| 650 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 651 | inline EmptyFrameNetworkingContext::EmptyFrameNetworkingContext() |
| 652 | : FrameNetworkingContext { nullptr } |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 653 | { |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 654 | } |
| 655 | |
| 656 | Ref<FrameNetworkingContext> EmptyFrameLoaderClient::createNetworkingContext() |
| 657 | { |
| 658 | return EmptyFrameNetworkingContext::create(); |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 659 | } |
| 660 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 661 | void EmptyEditorClient::EmptyTextCheckerClient::requestCheckingOfString(TextCheckingRequest&, const VisibleSelection&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 662 | { |
| 663 | } |
| 664 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 665 | void EmptyEditorClient::registerUndoStep(UndoStep&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 666 | { |
| 667 | } |
| 668 | |
darin@apple.com | c04189e | 2017-01-18 05:17:17 +0000 | [diff] [blame] | 669 | void EmptyEditorClient::registerRedoStep(UndoStep&) |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 670 | { |
| 671 | } |
ossy@webkit.org | 7917deb | 2016-07-14 20:14:22 +0000 | [diff] [blame] | 672 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 673 | RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createSessionStorageNamespace(Page&, unsigned) |
| 674 | { |
| 675 | return adoptRef(*new EmptyStorageNamespace); |
| 676 | } |
| 677 | |
| 678 | RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createLocalStorageNamespace(unsigned) |
| 679 | { |
| 680 | return adoptRef(*new EmptyStorageNamespace); |
| 681 | } |
| 682 | |
beidson@apple.com | 6fc12ef | 2017-04-13 06:38:19 +0000 | [diff] [blame] | 683 | RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createEphemeralLocalStorageNamespace(Page&, unsigned) |
| 684 | { |
| 685 | return adoptRef(*new EmptyStorageNamespace); |
| 686 | } |
| 687 | |
darin@apple.com | af74ed1 | 2017-01-07 22:08:28 +0000 | [diff] [blame] | 688 | RefPtr<StorageNamespace> EmptyStorageNamespaceProvider::createTransientLocalStorageNamespace(SecurityOrigin&, unsigned) |
| 689 | { |
| 690 | return adoptRef(*new EmptyStorageNamespace); |
| 691 | } |
| 692 | |
| 693 | void fillWithEmptyClients(PageConfiguration& pageConfiguration) |
| 694 | { |
| 695 | static NeverDestroyed<EmptyChromeClient> dummyChromeClient; |
| 696 | pageConfiguration.chromeClient = &dummyChromeClient.get(); |
| 697 | |
| 698 | #if ENABLE(APPLE_PAY) |
| 699 | static NeverDestroyed<EmptyPaymentCoordinatorClient> dummyPaymentCoordinatorClient; |
| 700 | pageConfiguration.paymentCoordinatorClient = &dummyPaymentCoordinatorClient.get(); |
| 701 | #endif |
| 702 | |
| 703 | #if ENABLE(CONTEXT_MENUS) |
| 704 | static NeverDestroyed<EmptyContextMenuClient> dummyContextMenuClient; |
| 705 | pageConfiguration.contextMenuClient = &dummyContextMenuClient.get(); |
| 706 | #endif |
| 707 | |
| 708 | #if ENABLE(DRAG_SUPPORT) |
| 709 | static NeverDestroyed<EmptyDragClient> dummyDragClient; |
| 710 | pageConfiguration.dragClient = &dummyDragClient.get(); |
| 711 | #endif |
| 712 | |
| 713 | static NeverDestroyed<EmptyInspectorClient> dummyInspectorClient; |
| 714 | pageConfiguration.inspectorClient = &dummyInspectorClient.get(); |
| 715 | |
| 716 | static NeverDestroyed<EmptyFrameLoaderClient> dummyFrameLoaderClient; |
| 717 | pageConfiguration.loaderClientForMainFrame = &dummyFrameLoaderClient.get(); |
| 718 | |
| 719 | static NeverDestroyed<EmptyProgressTrackerClient> dummyProgressTrackerClient; |
| 720 | pageConfiguration.progressTrackerClient = &dummyProgressTrackerClient.get(); |
| 721 | |
| 722 | pageConfiguration.backForwardClient = adoptRef(*new EmptyBackForwardClient); |
| 723 | pageConfiguration.diagnosticLoggingClient = std::make_unique<EmptyDiagnosticLoggingClient>(); |
| 724 | |
| 725 | pageConfiguration.applicationCacheStorage = ApplicationCacheStorage::create({ }, { }); |
| 726 | pageConfiguration.databaseProvider = adoptRef(*new EmptyDatabaseProvider); |
| 727 | pageConfiguration.pluginInfoProvider = adoptRef(*new EmptyPluginInfoProvider); |
| 728 | pageConfiguration.storageNamespaceProvider = adoptRef(*new EmptyStorageNamespaceProvider); |
| 729 | pageConfiguration.userContentProvider = adoptRef(*new EmptyUserContentProvider); |
| 730 | pageConfiguration.visitedLinkStore = adoptRef(*new EmptyVisitedLinkStore); |
| 731 | } |
| 732 | |
| 733 | UniqueRef<EditorClient> createEmptyEditorClient() |
| 734 | { |
| 735 | return makeUniqueRef<EmptyEditorClient>(); |
| 736 | } |
| 737 | |
| 738 | DiagnosticLoggingClient& emptyDiagnosticLoggingClient() |
| 739 | { |
| 740 | static NeverDestroyed<EmptyDiagnosticLoggingClient> client; |
| 741 | return client; |
| 742 | } |
| 743 | |
tkent@chromium.org | 4e0dc66 | 2012-06-05 09:08:04 +0000 | [diff] [blame] | 744 | } |