webengine/osswebengine/WebKit/WebView/WebFrameInternal.h
changeset 0 dd21522fd290
equal deleted inserted replaced
-1:000000000000 0:dd21522fd290
       
     1 /*
       
     2  * Copyright (C) 2005, 2006 Apple Computer, Inc.  All rights reserved.
       
     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  *
       
     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. 
       
    16  *
       
    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.
       
    27  */
       
    28 
       
    29 // This header contains WebFrame declarations that can be used anywhere in WebKit, but are neither SPI nor API.
       
    30 
       
    31 #import "WebFramePrivate.h"
       
    32 #import "WebPreferencesPrivate.h"
       
    33 
       
    34 #ifdef __cplusplus
       
    35 #import <WebCore/FrameLoaderTypes.h>
       
    36 #import <WebCore/Settings.h>
       
    37 #endif
       
    38 
       
    39 @class DOMCSSStyleDeclaration;
       
    40 @class DOMElement;
       
    41 @class DOMNode;
       
    42 @class DOMRange;
       
    43 @class WebFrameView;
       
    44 @class WebFrameBridge;
       
    45 @class WebHistoryItem;
       
    46 @class WebScriptDebugger;
       
    47 
       
    48 #ifdef __cplusplus
       
    49 
       
    50 namespace WebCore {
       
    51     class CSSStyleDeclaration;
       
    52     class Document;
       
    53     class DocumentLoader;
       
    54     class Element;
       
    55     class Frame;
       
    56     class Frame;
       
    57     class FrameLoader;
       
    58     class HistoryItem;
       
    59     class HTMLElement;
       
    60     class Node;
       
    61     class Page;
       
    62     class Range;
       
    63 }
       
    64 
       
    65 typedef WebCore::HistoryItem WebCoreHistoryItem;
       
    66 
       
    67 WebCore::CSSStyleDeclaration* core(DOMCSSStyleDeclaration *);
       
    68 DOMCSSStyleDeclaration *kit(WebCore::CSSStyleDeclaration*);
       
    69 
       
    70 WebCore::Frame* core(WebFrame *);
       
    71 WebFrame *kit(WebCore::Frame *);
       
    72 
       
    73 WebCore::Element* core(DOMElement *);
       
    74 DOMElement *kit(WebCore::Element*);
       
    75 
       
    76 WebCore::Node* core(DOMNode *);
       
    77 DOMNode *kit(WebCore::Node*);
       
    78 
       
    79 WebCore::Document* core(DOMDocument *);
       
    80 DOMDocument *kit(WebCore::Document*);
       
    81 
       
    82 WebCore::HTMLElement* core(DOMHTMLElement *);
       
    83 DOMHTMLElement *kit(WebCore::HTMLElement*);
       
    84 
       
    85 WebCore::Range* core(DOMRange *);
       
    86 DOMRange *kit(WebCore::Range*);
       
    87 
       
    88 WebCore::Page* core(WebView *);
       
    89 WebView *kit(WebCore::Page*);
       
    90 
       
    91 WebCore::EditableLinkBehavior core(WebKitEditableLinkBehavior);
       
    92 WebKitEditableLinkBehavior kit(WebCore::EditableLinkBehavior);
       
    93 
       
    94 WebView *getWebView(WebFrame *webFrame);
       
    95 
       
    96 @interface WebFramePrivate : NSObject
       
    97 {
       
    98 @public
       
    99     WebFrameView *webFrameView;
       
   100 
       
   101     WebFrameBridge *bridge;
       
   102 
       
   103     WebScriptDebugger *scriptDebugger;
       
   104     id internalLoadDelegate;
       
   105 }
       
   106 @end
       
   107 
       
   108 #else
       
   109 struct WebCoreHistoryItem;
       
   110 #endif
       
   111 
       
   112 @interface WebFrame (WebInternal)
       
   113 
       
   114 - (void)_updateBackground;
       
   115 - (void)_setInternalLoadDelegate:(id)internalLoadDelegate;
       
   116 - (id)_internalLoadDelegate;
       
   117 #ifndef BUILDING_ON_TIGER
       
   118 - (void)_unmarkAllBadGrammar;
       
   119 #endif
       
   120 - (void)_unmarkAllMisspellings;
       
   121 // Note that callers should not perform any ops on these views that could change the set of frames
       
   122 - (NSArray *)_documentViews;
       
   123 
       
   124 - (BOOL)_hasSelection;
       
   125 - (void)_clearSelection;
       
   126 - (WebFrame *)_findFrameWithSelection;
       
   127 - (void)_clearSelectionInOtherFrames;
       
   128 #ifdef __cplusplus
       
   129 - (id)_initWithWebFrameView:(WebFrameView *)fv webView:(WebView *)v bridge:(WebFrameBridge *)bridge;
       
   130 #endif
       
   131 
       
   132 - (BOOL)_isMainFrame;
       
   133 
       
   134 #ifdef __cplusplus
       
   135 
       
   136 - (WebCore::FrameLoader*)_frameLoader;
       
   137 - (WebDataSource *)_dataSourceForDocumentLoader:(WebCore::DocumentLoader*)loader;
       
   138 
       
   139 - (void)_addDocumentLoader:(WebCore::DocumentLoader*)loader toUnarchiveState:(WebArchive *)archive;
       
   140 
       
   141 #endif
       
   142 
       
   143 - (WebFrameBridge *)_bridge;
       
   144 
       
   145 - (void)_loadURL:(NSURL *)URL referrer:(NSString *)referrer intoChild:(WebFrame *)childFrame;
       
   146 
       
   147 - (void)_viewWillMoveToHostWindow:(NSWindow *)hostWindow;
       
   148 - (void)_viewDidMoveToHostWindow;
       
   149 
       
   150 - (void)_addChild:(WebFrame *)child;
       
   151 
       
   152 + (CFAbsoluteTime)_timeOfLastCompletedLoad;
       
   153 
       
   154 - (int)_numPendingOrLoadingRequests:(BOOL)recurse;
       
   155 
       
   156 - (void)_reloadForPluginChanges;
       
   157 
       
   158 - (void)_attachScriptDebugger;
       
   159 - (void)_detachScriptDebugger;
       
   160 
       
   161 // dataSource reports null for the initial empty document's data source; this is needed
       
   162 // to preserve compatibility with Mail and Safari among others. But internal to WebKit,
       
   163 // we need to be able to get the initial data source as well, so the _dataSource method
       
   164 // should be used instead.
       
   165 - (WebDataSource *)_dataSource;
       
   166 
       
   167 @end
       
   168 
       
   169 @interface NSObject (WebInternalFrameLoadDelegate)
       
   170 - (void)webFrame:(WebFrame *)webFrame didFinishLoadWithError:(NSError *)error;
       
   171 @end