2 * Copyright (C) 2005, 2006 Apple Computer, Inc. All rights reserved.
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #import <WebKit/WebDataSourcePrivate.h>
30 #import <WebKitSystemInterface.h>
34 @class DOMDocumentFragment;
42 @class WebFrameBridge;
43 @class WebHistoryItem;
44 @class WebMainResourceLoader;
45 @class WebPolicyDecisionListener;
47 @class WebUnarchivingState;
49 @class WebDocumentLoadState;
50 @class WebDocumentLoadStateMac;
52 @protocol WebDocumentRepresentation;
54 @interface WebDataSource (WebInternal)
55 - (void)_setTitle:(NSString *)title;
56 - (NSString *)_overrideEncoding;
57 - (void)_setOverrideEncoding:(NSString *)overrideEncoding;
58 - (void)_addToUnarchiveState:(WebArchive *)archive;
59 - (NSURL *)_URLForHistory;
60 - (BOOL)_isClientRedirect;
61 - (void)_makeRepresentation;
62 - (BOOL)_loadingFromPageCache;
63 - (NSArray *)_responses;
64 - (void)_setPrimaryLoadComplete:(BOOL)flag;
65 - (BOOL)_isDocumentHTML;
66 - (void)_setTriggeringAction:(NSDictionary *)action;
67 - (NSDictionary *)_triggeringAction;
68 - (WebView *)_webView;
69 - (WebFrameBridge *)_bridge;
70 - (void)_stopLoadingWithError:(NSError *)error;
71 - (NSURLRequest *)_lastCheckedRequest;
72 - (void)_setLastCheckedRequest:(NSURLRequest *)request;
73 - (void)_setIsClientRedirect:(BOOL)flag;
74 - (WebArchive *)_popSubframeArchiveWithName:(NSString *)frameName;
75 - (void)_loadFromPageCache:(NSDictionary *)pageCache;
77 - (void)_setWebFrame:(WebFrame *)frame;
79 - (DOMElement *)_imageElementWithImageResource:(WebResource *)resource;
80 - (DOMDocumentFragment *)_documentFragmentWithImageResource:(WebResource *)resource;
81 - (DOMDocumentFragment *)_documentFragmentWithArchive:(WebArchive *)archive;
82 + (NSMutableDictionary *)_repTypesAllowImageTypeOmission:(BOOL)allowImageTypeOmission;
83 - (void)_replaceSelectionWithArchive:(WebArchive *)archive selectReplacement:(BOOL)selectReplacement;
84 - (double)_loadingStartedTime;
85 - (void)_stopRecordingResponses;
86 - (void)_startLoading;
87 - (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
88 - (double)_loadingStartedTime;
89 - (void)_stopRecordingResponses;
90 - (void)_startLoading;
91 - (WebResource *)_archivedSubresourceForURL:(NSURL *)URL;
92 - (id)_identifierForInitialRequest:(NSURLRequest *)clientRequest;
93 - (NSURLRequest *)_willSendRequest:(NSMutableURLRequest *)clientRequest forResource:(id)identifier redirectResponse:(NSURLResponse *)redirectResponse;
94 - (void)_didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)currentWebChallenge forResource:(id)identifier;
95 - (void)_didCancelAuthenticationChallenge:(NSURLAuthenticationChallenge *)currentWebChallenge forResource:(id)identifier;
96 - (void)_didReceiveResponse:(NSURLResponse *)r forResource:(id)identifier;
97 - (void)_didReceiveData:(NSData *)data contentLength:(int)lengthReceived forResource:(id)identifier;
98 - (void)_didFinishLoadingForResource:(id)identifier;
99 - (void)_didFailLoadingWithError:(NSError *)error forResource:(id)identifier;
100 - (void)_downloadWithLoadingConnection:(NSURLConnection *)connection request:(NSURLRequest *)request response:(NSURLResponse *)r proxy:(WKNSURLConnectionDelegateProxyPtr) proxy;
101 - (void)_receivedMainResourceError:(NSError *)error complete:(BOOL)isComplete;
102 - (void)_decidePolicyForMIMEType:(NSString *)MIMEType decisionListener:(WebPolicyDecisionListener *)listener;
103 - (WebDocumentLoadState *)_documentLoadState;
104 - (id)_initWithDocumentLoadState:(WebDocumentLoadStateMac *)loadState;
105 - (void)_finishedLoading;
106 - (void)_receivedData:(NSData *)data;
107 - (void)_revertToProvisionalState;
108 - (void)_setMainDocumentError:(NSError *)error;
109 - (void)_clearUnarchivingState;