WebKit/mac/WebView/WebViewData.h
changeset 0 4f2f89ce4247
equal deleted inserted replaced
-1:000000000000 0:4f2f89ce4247
       
     1 /*
       
     2  * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
       
     3  * Copyright (C) 2010 Igalia S.L
       
     4  *
       
     5  * Redistribution and use in source and binary forms, with or without
       
     6  * modification, are permitted provided that the following conditions
       
     7  * are met:
       
     8  *
       
     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  * 3.  Neither the name of Apple Computer, Inc. ("Apple") nor the names of
       
    15  *     its contributors may be used to endorse or promote products derived
       
    16  *     from this software without specific prior written permission. 
       
    17  *
       
    18  * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
       
    19  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
       
    20  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
       
    21  * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
       
    22  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
       
    23  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
       
    24  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
       
    25  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
       
    26  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
       
    27  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
       
    28  */
       
    29 
       
    30 #import "WebTypesInternal.h"
       
    31 #import "WebDelegateImplementationCaching.h"
       
    32 #import <WebCore/PlatformString.h>
       
    33 #import <WebCore/WebCoreKeyboardUIMode.h>
       
    34 #import <wtf/HashMap.h>
       
    35 #import <wtf/RetainPtr.h>
       
    36 
       
    37 namespace WebCore {
       
    38     class Page;
       
    39 }
       
    40 
       
    41 @class WebInspector;
       
    42 @class WebNodeHighlight;
       
    43 @class WebPluginDatabase;
       
    44 @class WebPreferences;
       
    45 @class WebTextCompletionController;
       
    46 @protocol WebFormDelegate;
       
    47 @protocol WebGeolocationProvider;
       
    48 #if ENABLE(VIDEO)
       
    49 @class WebVideoFullscreenController;
       
    50 #endif
       
    51 
       
    52 extern BOOL applicationIsTerminating;
       
    53 extern int pluginDatabaseClientCount;
       
    54 
       
    55 // FIXME: This should be renamed to WebViewData.
       
    56 @interface WebViewPrivate : NSObject {
       
    57 @public
       
    58     WebCore::Page* page;
       
    59     
       
    60     id UIDelegate;
       
    61     id UIDelegateForwarder;
       
    62     id resourceProgressDelegate;
       
    63     id downloadDelegate;
       
    64     id policyDelegate;
       
    65     id policyDelegateForwarder;
       
    66     id frameLoadDelegate;
       
    67     id frameLoadDelegateForwarder;
       
    68     id <WebFormDelegate> formDelegate;
       
    69     id editingDelegate;
       
    70     id editingDelegateForwarder;
       
    71     id scriptDebugDelegate;
       
    72     id historyDelegate;
       
    73 
       
    74     WebInspector *inspector;
       
    75     WebNodeHighlight *currentNodeHighlight;
       
    76 
       
    77     BOOL allowsUndo;
       
    78         
       
    79     float zoomMultiplier;
       
    80 
       
    81     NSString *applicationNameForUserAgent;
       
    82     WebCore::String userAgent;
       
    83     BOOL userAgentOverridden;
       
    84     
       
    85     WebPreferences *preferences;
       
    86     BOOL useSiteSpecificSpoofing;
       
    87 
       
    88     NSWindow *hostWindow;
       
    89 
       
    90     int programmaticFocusCount;
       
    91     
       
    92     WebResourceDelegateImplementationCache resourceLoadDelegateImplementations;
       
    93     WebFrameLoadDelegateImplementationCache frameLoadDelegateImplementations;
       
    94     WebScriptDebugDelegateImplementationCache scriptDebugDelegateImplementations;
       
    95     WebHistoryDelegateImplementationCache historyDelegateImplementations;
       
    96 
       
    97     void *observationInfo;
       
    98     
       
    99     BOOL closed;
       
   100     BOOL shouldCloseWithWindow;
       
   101     BOOL mainFrameDocumentReady;
       
   102     BOOL drawsBackground;
       
   103     BOOL editable;
       
   104     BOOL tabKeyCyclesThroughElementsChanged;
       
   105     BOOL becomingFirstResponder;
       
   106     BOOL becomingFirstResponderFromOutside;
       
   107     BOOL hoverFeedbackSuspended;
       
   108     BOOL usesPageCache;
       
   109     BOOL catchesDelegateExceptions;
       
   110     BOOL cssAnimationsSuspended;
       
   111 
       
   112     NSColor *backgroundColor;
       
   113 
       
   114     NSString *mediaStyle;
       
   115     
       
   116     BOOL hasSpellCheckerDocumentTag;
       
   117     NSInteger spellCheckerDocumentTag;
       
   118 
       
   119     BOOL smartInsertDeleteEnabled;
       
   120     BOOL selectTrailingWhitespaceEnabled;
       
   121         
       
   122 #if ENABLE(DASHBOARD_SUPPORT)
       
   123     BOOL dashboardBehaviorAlwaysSendMouseEventsToAllWindows;
       
   124     BOOL dashboardBehaviorAlwaysSendActiveNullEventsToPlugIns;
       
   125     BOOL dashboardBehaviorAlwaysAcceptsFirstMouse;
       
   126     BOOL dashboardBehaviorAllowWheelScrolling;
       
   127 #endif
       
   128     
       
   129     // WebKit has both a global plug-in database and a separate, per WebView plug-in database. Dashboard uses the per WebView database.
       
   130     WebPluginDatabase *pluginDatabase;
       
   131     
       
   132     HashMap<unsigned long, RetainPtr<id> > identifierMap;
       
   133 
       
   134     BOOL _keyboardUIModeAccessed;
       
   135     WebCore::KeyboardUIMode _keyboardUIMode;
       
   136 
       
   137     BOOL shouldUpdateWhileOffscreen;
       
   138     
       
   139     // When this flag is set, we will not make any subviews underneath this WebView.  This means no WebFrameViews and no WebHTMLViews.
       
   140     BOOL usesDocumentViews;
       
   141 
       
   142     BOOL includesFlattenedCompositingLayersWhenDrawingToBitmap;
       
   143     
       
   144 #if USE(ACCELERATED_COMPOSITING)
       
   145     // When this flag is set, next time a WebHTMLView draws, it needs to temporarily disable screen updates
       
   146     // so that the NSView drawing is visually synchronized with CALayer updates.
       
   147     BOOL needsOneShotDrawingSynchronization;
       
   148     BOOL postsAcceleratedCompositingNotifications;
       
   149     // Run loop observer used to implement the compositing equivalent of -viewWillDraw
       
   150     CFRunLoopObserverRef layerSyncRunLoopObserver;
       
   151 #endif
       
   152 
       
   153     NSPasteboard *insertionPasteboard;
       
   154             
       
   155     NSSize lastLayoutSize;
       
   156 
       
   157     BOOL ignoringMouseDraggedEvents;
       
   158 
       
   159     NSEvent *mouseDownEvent; // Kept after handling the event.
       
   160     BOOL handlingMouseDownEvent;
       
   161     NSEvent *keyDownEvent; // Kept after handling the event.
       
   162 
       
   163     WebTextCompletionController *completionController;
       
   164 
       
   165     NSTimer *autoscrollTimer;
       
   166     NSEvent *autoscrollTriggerEvent;
       
   167 
       
   168     CFRunLoopTimerRef updateMouseoverTimer;
       
   169 #if ENABLE(VIDEO)
       
   170     WebVideoFullscreenController *fullscreenController;
       
   171 #endif
       
   172 
       
   173 #if ENABLE(VIDEO) && USE(GSTREAMER)
       
   174     CFRunLoopObserverRef glibRunLoopObserver;
       
   175 #endif
       
   176     id<WebGeolocationProvider> _geolocationProvider;
       
   177 }
       
   178 @end