1/* 2 * Copyright (C) 2010 Apple 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 * 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 INC. AND ITS CONTRIBUTORS ``AS IS'' 14 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 15 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 16 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS 17 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 18 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 19 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 20 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 21 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 23 * THE POSSIBILITY OF SUCH DAMAGE. 24 */ 25 26#import "WKViewPrivate.h" 27 28#import "PluginComplexTextInputState.h" 29#import "SameDocumentNavigationType.h" 30#import "WebFindOptions.h" 31#import <wtf/Forward.h> 32#import <wtf/RetainPtr.h> 33#import <wtf/Vector.h> 34 35@class WKWebViewConfiguration; 36 37namespace IPC { 38class DataReference; 39} 40 41namespace WebCore { 42class Image; 43class SharedBuffer; 44struct KeypressCommand; 45} 46 47namespace WebKit { 48class DrawingAreaProxy; 49class FindIndicator; 50class LayerTreeContext; 51class ViewSnapshot; 52class WebContext; 53struct ColorSpaceData; 54struct EditorState; 55struct WebPageConfiguration; 56} 57 58@class WKFullScreenWindowController; 59@class WKWebView; 60#if WK_API_ENABLED 61@class _WKThumbnailView; 62#endif 63 64@interface WKView () 65#if WK_API_ENABLED 66- (instancetype)initWithFrame:(CGRect)frame context:(WebKit::WebContext&)context configuration:(WebKit::WebPageConfiguration)webPageConfiguration webView:(WKWebView *)webView; 67#endif 68 69- (std::unique_ptr<WebKit::DrawingAreaProxy>)_createDrawingAreaProxy; 70- (BOOL)_isFocused; 71- (void)_processDidExit; 72- (void)_pageClosed; 73- (void)_didRelaunchProcess; 74- (void)_preferencesDidChange; 75- (void)_toolTipChangedFrom:(NSString *)oldToolTip to:(NSString *)newToolTip; 76- (void)_setUserInterfaceItemState:(NSString *)commandName enabled:(BOOL)isEnabled state:(int)newState; 77- (void)_doneWithKeyEvent:(NSEvent *)event eventWasHandled:(BOOL)eventWasHandled; 78- (bool)_executeSavedCommandBySelector:(SEL)selector; 79- (void)_setIntrinsicContentSize:(NSSize)intrinsicContentSize; 80- (NSRect)_convertToDeviceSpace:(NSRect)rect; 81- (NSRect)_convertToUserSpace:(NSRect)rect; 82- (void)_setFindIndicator:(PassRefPtr<WebKit::FindIndicator>)findIndicator fadeOut:(BOOL)fadeOut animate:(BOOL)animate; 83 84- (void)_setAcceleratedCompositingModeRootLayer:(CALayer *)rootLayer; 85- (CALayer *)_acceleratedCompositingModeRootLayer; 86 87- (PassRefPtr<WebKit::ViewSnapshot>)_takeViewSnapshot; 88- (void)_wheelEventWasNotHandledByWebCore:(NSEvent *)event; 89 90- (void)_setAccessibilityWebProcessToken:(NSData *)data; 91 92- (void)_pluginFocusOrWindowFocusChanged:(BOOL)pluginHasFocusAndWindowHasFocus pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier; 93- (void)_setPluginComplexTextInputState:(WebKit::PluginComplexTextInputState)pluginComplexTextInputState pluginComplexTextInputIdentifier:(uint64_t)pluginComplexTextInputIdentifier; 94 95- (void)_setDragImage:(NSImage *)image at:(NSPoint)clientPoint linkDrag:(BOOL)linkDrag; 96- (void)_setPromisedData:(WebCore::Image *)image withFileName:(NSString *)filename withExtension:(NSString *)extension withTitle:(NSString *)title withURL:(NSString *)url withVisibleURL:(NSString *)visibleUrl withArchive:(WebCore::SharedBuffer*) archiveBuffer forPasteboard:(NSString *)pasteboardName; 97- (void)_updateSecureInputState; 98- (void)_resetSecureInputState; 99- (void)_notifyInputContextAboutDiscardedComposition; 100 101- (WebKit::ColorSpaceData)_colorSpace; 102 103- (void)_cacheWindowBottomCornerRect; 104 105- (NSInteger)spellCheckerDocumentTag; 106- (void)handleAcceptedAlternativeText:(NSString*)text; 107 108- (void)_setSuppressVisibilityUpdates:(BOOL)suppressVisibilityUpdates; 109- (BOOL)_suppressVisibilityUpdates; 110 111- (void)_didFirstVisuallyNonEmptyLayoutForMainFrame; 112- (void)_didFinishLoadForMainFrame; 113- (void)_didSameDocumentNavigationForMainFrame:(WebKit::SameDocumentNavigationType)type; 114- (void)_removeNavigationGestureSnapshot; 115 116#if WK_API_ENABLED 117@property (nonatomic, setter=_setThumbnailView:) _WKThumbnailView *_thumbnailView; 118- (void)_reparentLayerTreeInThumbnailView; 119#endif 120 121// FullScreen 122 123@property (readonly) BOOL _hasFullScreenWindowController; 124@property (readonly) WKFullScreenWindowController *_fullScreenWindowController; 125- (void)_closeFullScreenWindowController; 126 127@end 128