Changeset 160296 in webkit
- Timestamp:
- Dec 8, 2013 8:11:00 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 1 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r160291 r160296 1 2013-12-08 Sam Weinig <sam@webkit.org> 2 3 [Cocoa] Remove knowledge of the WKView from the WebFullScreenManagerProxy by adding a proper client 4 https://bugs.webkit.org/show_bug.cgi?id=125427 5 6 Reviewed by Dan Bernstein. 7 8 * UIProcess/API/mac/PageClientImpl.h: 9 * UIProcess/API/mac/PageClientImpl.mm: 10 (WebKit::PageClientImpl::fullScreenManagerProxyClient): 11 (WebKit::PageClientImpl::closeFullScreenManager): 12 (WebKit::PageClientImpl::isFullScreen): 13 (WebKit::PageClientImpl::enterFullScreen): 14 (WebKit::PageClientImpl::exitFullScreen): 15 (WebKit::PageClientImpl::beganEnterFullScreen): 16 (WebKit::PageClientImpl::beganExitFullScreen): 17 Implement the new client. 18 19 * UIProcess/API/mac/WKView.mm: 20 Remove call to setWebView() and do some cleanup. 21 22 * UIProcess/API/mac/WKViewInternal.h: 23 Convert to property syntax and re-arrange. 24 25 * UIProcess/PageClient.h: 26 Expose access to the new client. 27 28 * UIProcess/WebFullScreenManagerProxy.cpp: 29 (WebKit::WebFullScreenManagerProxy::create): 30 (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): 31 (WebKit::WebFullScreenManagerProxy::invalidate): 32 (WebKit::WebFullScreenManagerProxy::close): 33 (WebKit::WebFullScreenManagerProxy::isFullScreen): 34 (WebKit::WebFullScreenManagerProxy::enterFullScreen): 35 (WebKit::WebFullScreenManagerProxy::exitFullScreen): 36 (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): 37 (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): 38 * UIProcess/WebFullScreenManagerProxy.h: 39 Use the new client. 40 41 * UIProcess/WebPageProxy.cpp: 42 Pass the new client. 43 44 * UIProcess/mac/WebFullScreenManagerProxyMac.mm: 45 Removed. Now goes through the client. 46 47 * WebKit2.xcodeproj/project.pbxproj: 48 Remove WebFullScreenManagerProxyMac.mm. 49 1 50 2013-12-07 Sam Weinig <sam@webkit.org> 2 51 -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.h
r159859 r160296 29 29 #include "CorrectionPanel.h" 30 30 #include "PageClient.h" 31 #include "WebFullScreenManagerProxy.h" 31 32 #include <wtf/RetainPtr.h> 32 33 … … 41 42 class FindIndicatorWindow; 42 43 43 class PageClientImpl FINAL : public PageClient { 44 class PageClientImpl FINAL : public PageClient 45 #if ENABLE(FULLSCREEN_API) 46 , public WebFullScreenManagerProxyClient 47 #endif 48 { 44 49 public: 45 explicit PageClientImpl(WKView *);50 explicit PageClientImpl(WKView *); 46 51 virtual ~PageClientImpl(); 47 52 … … 49 54 50 55 private: 56 // PageClient 51 57 virtual std::unique_ptr<DrawingAreaProxy> createDrawingAreaProxy(); 52 58 virtual void setViewNeedsDisplay(const WebCore::IntRect&); … … 135 141 #endif 136 142 143 // Auxiliary Client Creation 144 #if ENABLE(FULLSCREEN_API) 145 WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() OVERRIDE; 146 #endif 147 148 #if ENABLE(FULLSCREEN_API) 149 // WebFullScreenManagerProxyClient 150 virtual void closeFullScreenManager() OVERRIDE; 151 virtual bool isFullScreen() OVERRIDE; 152 virtual void enterFullScreen() OVERRIDE; 153 virtual void exitFullScreen() OVERRIDE; 154 virtual void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) OVERRIDE; 155 virtual void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) OVERRIDE; 156 #endif 157 137 158 WKView* m_wkView; 138 159 RetainPtr<WKEditorUndoTargetObjC> m_undoTarget; -
trunk/Source/WebKit2/UIProcess/API/mac/PageClientImpl.mm
r159859 r160296 27 27 #import "PageClientImpl.h" 28 28 29 #if USE(DICTATION_ALTERNATIVES)30 #import <AppKit/NSTextAlternatives.h>31 #endif32 29 #import "AttributedString.h" 33 30 #import "ColorSpaceData.h" … … 36 33 #import "FindIndicator.h" 37 34 #import "NativeWebKeyboardEvent.h" 35 #import "StringUtilities.h" 38 36 #import "WKAPICast.h" 37 #import "WKFullScreenWindowController.h" 39 38 #import "WKStringCF.h" 40 39 #import "WKViewInternal.h" 41 #import "WKViewPrivate.h"42 #import "StringUtilities.h"43 40 #import "WebColorPickerMac.h" 44 41 #import "WebContextMenuProxyMac.h" … … 54 51 #import <WebCore/NotImplemented.h> 55 52 #import <WebCore/SharedBuffer.h> 53 #import <WebKitSystemInterface.h> 56 54 #import <wtf/text/CString.h> 57 55 #import <wtf/text/WTFString.h> 58 #import <WebKitSystemInterface.h> 56 57 #if USE(DICTATION_ALTERNATIVES) 58 #import <AppKit/NSTextAlternatives.h> 59 #endif 59 60 60 61 @interface NSApplication (WebNSApplicationDetails) … … 555 556 #endif 556 557 558 #if ENABLE(FULLSCREEN_API) 559 560 WebFullScreenManagerProxyClient& PageClientImpl::fullScreenManagerProxyClient() 561 { 562 return *this; 563 } 564 565 // WebFullScreenManagerProxyClient 566 567 void PageClientImpl::closeFullScreenManager() 568 { 569 [m_wkView _closeFullScreenWindowController]; 570 } 571 572 bool PageClientImpl::isFullScreen() 573 { 574 if (!m_wkView._hasFullScreenWindowController) 575 return false; 576 577 return m_wkView._fullScreenWindowController.isFullScreen; 578 } 579 580 void PageClientImpl::enterFullScreen() 581 { 582 [m_wkView._fullScreenWindowController enterFullScreen:nil]; 583 } 584 585 void PageClientImpl::exitFullScreen() 586 { 587 [m_wkView._fullScreenWindowController exitFullScreen]; 588 } 589 590 void PageClientImpl::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame) 591 { 592 [m_wkView._fullScreenWindowController beganEnterFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame]; 593 } 594 595 void PageClientImpl::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame) 596 { 597 [m_wkView._fullScreenWindowController beganExitFullScreenWithInitialFrame:initialFrame finalFrame:finalFrame]; 598 } 599 600 #endif // ENABLE(FULLSCREEN_API) 601 557 602 } // namespace WebKit -
trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm
r159903 r160296 59 59 #import "WebContext.h" 60 60 #import "WebEventFactory.h" 61 #import "WebFullScreenManagerProxy.h"62 61 #import "WebKit2Initialize.h" 63 62 #import "WebPage.h" … … 76 75 #import <WebCore/Image.h> 77 76 #import <WebCore/IntRect.h> 77 #import <WebCore/FileSystem.h> 78 78 #import <WebCore/KeyboardEvent.h> 79 79 #import <WebCore/LocalizedStrings.h> … … 83 83 #import <WebCore/SharedBuffer.h> 84 84 #import <WebCore/TextAlternativeWithRange.h> 85 #import <WebCore/WebCoreNSStringExtras.h>86 85 #import <WebCore/WebCoreFullScreenPlaceholderView.h> 87 86 #import <WebCore/WebCoreFullScreenWindow.h> 88 #import <WebCore/ FileSystem.h>87 #import <WebCore/WebCoreNSStringExtras.h> 89 88 #import <WebKitSystemInterface.h> 90 89 #import <sys/stat.h> … … 2783 2782 2784 2783 #if ENABLE(FULLSCREEN_API) 2785 - (BOOL) hasFullScreenWindowController2784 - (BOOL)_hasFullScreenWindowController 2786 2785 { 2787 2786 return (bool)_data->_fullScreenWindowController; 2788 2787 } 2789 2788 2790 - (WKFullScreenWindowController *)fullScreenWindowController2789 - (WKFullScreenWindowController *)_fullScreenWindowController 2791 2790 { 2792 2791 if (!_data->_fullScreenWindowController) … … 2796 2795 } 2797 2796 2798 - (void) closeFullScreenWindowController2797 - (void)_closeFullScreenWindowController 2799 2798 { 2800 2799 if (!_data->_fullScreenWindowController) 2801 2800 return; 2802 [_data->_fullScreenWindowController.get() close]; 2801 2802 [_data->_fullScreenWindowController close]; 2803 2803 _data->_fullScreenWindowController = nullptr; 2804 2804 } … … 2912 2912 _data->_page->setIntrinsicDeviceScaleFactor([self _intrinsicDeviceScaleFactor]); 2913 2913 _data->_page->initializeWebPage(); 2914 #if ENABLE(FULLSCREEN_API) 2915 _data->_page->fullScreenManager()->setWebView(self); 2916 #endif 2914 2917 2915 _data->_mouseDownEvent = nil; 2918 2916 _data->_ignoringMouseDraggedEvents = NO; … … 3123 3121 } 3124 3122 3125 - (NSView *)fullScreenPlaceholderView3123 - (NSView *)fullScreenPlaceholderView 3126 3124 { 3127 3125 #if ENABLE(FULLSCREEN_API) … … 3132 3130 } 3133 3131 3134 - (void)beginDeferringViewInWindowChanges 3135 { 3136 if (_data->_shouldDeferViewInWindowChanges) { 3137 NSLog(@"beginDeferringViewInWindowChanges was called while already deferring view-in-window changes!"); 3138 return; 3139 } 3140 3141 _data->_shouldDeferViewInWindowChanges = YES; 3142 } 3143 3144 - (void)endDeferringViewInWindowChanges 3145 { 3146 if (!_data->_shouldDeferViewInWindowChanges) { 3147 NSLog(@"endDeferringViewInWindowChanges was called without beginDeferringViewInWindowChanges!"); 3148 return; 3149 } 3150 3151 _data->_shouldDeferViewInWindowChanges = NO; 3152 3153 if (_data->_viewInWindowChangeWasDeferred) { 3154 _data->_page->viewStateDidChange(ViewState::IsInWindow); 3155 _data->_viewInWindowChangeWasDeferred = NO; 3156 } 3157 } 3158 3159 - (void)endDeferringViewInWindowChangesSync 3160 { 3161 if (!_data->_shouldDeferViewInWindowChanges) { 3162 NSLog(@"endDeferringViewInWindowChangesSync was called without beginDeferringViewInWindowChanges!"); 3163 return; 3164 } 3165 3166 PageClient* pageClient = _data->_pageClient.get(); 3167 bool hasPendingViewInWindowChange = _data->_viewInWindowChangeWasDeferred && _data->_page->isInWindow() != pageClient->isViewInWindow(); 3168 3169 _data->_shouldDeferViewInWindowChanges = NO; 3170 3171 if (_data->_viewInWindowChangeWasDeferred) { 3172 _data->_page->viewStateDidChange(ViewState::IsInWindow, hasPendingViewInWindowChange ? WebPageProxy::WantsReplyOrNot::DoesWantReply : WebPageProxy::WantsReplyOrNot::DoesNotWantReply); 3173 _data->_viewInWindowChangeWasDeferred = NO; 3174 } 3175 3176 if (hasPendingViewInWindowChange) 3177 _data->_page->waitForDidUpdateViewState(); 3178 } 3179 3180 - (BOOL)isDeferringViewInWindowChanges 3181 { 3182 return _data->_shouldDeferViewInWindowChanges; 3183 } 3184 3185 - (BOOL)windowOcclusionDetectionEnabled 3186 { 3187 return _data->_windowOcclusionDetectionEnabled; 3188 } 3189 3190 - (void)setWindowOcclusionDetectionEnabled:(BOOL)flag 3191 { 3192 _data->_windowOcclusionDetectionEnabled = flag; 3193 } 3194 3195 - (void)setContentAnchor:(WKContentAnchor)contentAnchor 3196 { 3197 _data->_contentAnchor = contentAnchor; 3198 } 3199 3200 - (WKContentAnchor)contentAnchor 3201 { 3202 return _data->_contentAnchor; 3203 } 3204 3205 // This method forces a drawing area geometry update, even if frame size updates are disabled. 3206 // The updated is performed asynchronously; we don't wait for the geometry update before returning. 3207 // The area drawn need not match the current frame size - if it differs it will be anchored to the 3208 // frame according to the current contentAnchor. 3209 - (void)forceAsyncDrawingAreaSizeUpdate:(NSSize)size 3210 { 3211 if (_data->_clipsToVisibleRect) 3212 [self _updateViewExposedRect]; 3213 [self _setDrawingAreaSize:size]; 3214 3215 // If a geometry update is pending the new update won't be sent. Poll without waiting for any 3216 // pending did-update message now, such that the new update can be sent. We do so after setting 3217 // the drawing area size such that the latest update is sent. 3218 if (DrawingAreaProxy* drawingArea = _data->_page->drawingArea()) 3219 drawingArea->waitForPossibleGeometryUpdate(0); 3220 } 3221 3222 - (void)waitForAsyncDrawingAreaSizeUpdate 3223 { 3224 if (DrawingAreaProxy* drawingArea = _data->_page->drawingArea()) { 3225 // If a geometry update is still pending then the action of recieving the 3226 // first geometry update may result in another update being scheduled - 3227 // we should wait for this to complete too. 3228 drawingArea->waitForPossibleGeometryUpdate(DrawingAreaProxy::didUpdateBackingStoreStateTimeout * 0.5); 3229 drawingArea->waitForPossibleGeometryUpdate(DrawingAreaProxy::didUpdateBackingStoreStateTimeout * 0.5); 3230 } 3231 } 3232 3233 - (NSWindow*)createFullScreenWindow 3132 - (NSWindow *)createFullScreenWindow 3234 3133 { 3235 3134 #if ENABLE(FULLSCREEN_API) … … 3245 3144 } 3246 3145 3146 - (void)beginDeferringViewInWindowChanges 3147 { 3148 if (_data->_shouldDeferViewInWindowChanges) { 3149 NSLog(@"beginDeferringViewInWindowChanges was called while already deferring view-in-window changes!"); 3150 return; 3151 } 3152 3153 _data->_shouldDeferViewInWindowChanges = YES; 3154 } 3155 3156 - (void)endDeferringViewInWindowChanges 3157 { 3158 if (!_data->_shouldDeferViewInWindowChanges) { 3159 NSLog(@"endDeferringViewInWindowChanges was called without beginDeferringViewInWindowChanges!"); 3160 return; 3161 } 3162 3163 _data->_shouldDeferViewInWindowChanges = NO; 3164 3165 if (_data->_viewInWindowChangeWasDeferred) { 3166 _data->_page->viewStateDidChange(ViewState::IsInWindow); 3167 _data->_viewInWindowChangeWasDeferred = NO; 3168 } 3169 } 3170 3171 - (void)endDeferringViewInWindowChangesSync 3172 { 3173 if (!_data->_shouldDeferViewInWindowChanges) { 3174 NSLog(@"endDeferringViewInWindowChangesSync was called without beginDeferringViewInWindowChanges!"); 3175 return; 3176 } 3177 3178 PageClient* pageClient = _data->_pageClient.get(); 3179 bool hasPendingViewInWindowChange = _data->_viewInWindowChangeWasDeferred && _data->_page->isInWindow() != pageClient->isViewInWindow(); 3180 3181 _data->_shouldDeferViewInWindowChanges = NO; 3182 3183 if (_data->_viewInWindowChangeWasDeferred) { 3184 _data->_page->viewStateDidChange(ViewState::IsInWindow, hasPendingViewInWindowChange ? WebPageProxy::WantsReplyOrNot::DoesWantReply : WebPageProxy::WantsReplyOrNot::DoesNotWantReply); 3185 _data->_viewInWindowChangeWasDeferred = NO; 3186 } 3187 3188 if (hasPendingViewInWindowChange) 3189 _data->_page->waitForDidUpdateViewState(); 3190 } 3191 3192 - (BOOL)isDeferringViewInWindowChanges 3193 { 3194 return _data->_shouldDeferViewInWindowChanges; 3195 } 3196 3197 - (BOOL)windowOcclusionDetectionEnabled 3198 { 3199 return _data->_windowOcclusionDetectionEnabled; 3200 } 3201 3202 - (void)setWindowOcclusionDetectionEnabled:(BOOL)flag 3203 { 3204 _data->_windowOcclusionDetectionEnabled = flag; 3205 } 3206 3207 - (void)setContentAnchor:(WKContentAnchor)contentAnchor 3208 { 3209 _data->_contentAnchor = contentAnchor; 3210 } 3211 3212 - (WKContentAnchor)contentAnchor 3213 { 3214 return _data->_contentAnchor; 3215 } 3216 3217 // This method forces a drawing area geometry update, even if frame size updates are disabled. 3218 // The updated is performed asynchronously; we don't wait for the geometry update before returning. 3219 // The area drawn need not match the current frame size - if it differs it will be anchored to the 3220 // frame according to the current contentAnchor. 3221 - (void)forceAsyncDrawingAreaSizeUpdate:(NSSize)size 3222 { 3223 if (_data->_clipsToVisibleRect) 3224 [self _updateViewExposedRect]; 3225 [self _setDrawingAreaSize:size]; 3226 3227 // If a geometry update is pending the new update won't be sent. Poll without waiting for any 3228 // pending did-update message now, such that the new update can be sent. We do so after setting 3229 // the drawing area size such that the latest update is sent. 3230 if (DrawingAreaProxy* drawingArea = _data->_page->drawingArea()) 3231 drawingArea->waitForPossibleGeometryUpdate(0); 3232 } 3233 3234 - (void)waitForAsyncDrawingAreaSizeUpdate 3235 { 3236 if (DrawingAreaProxy* drawingArea = _data->_page->drawingArea()) { 3237 // If a geometry update is still pending then the action of recieving the 3238 // first geometry update may result in another update being scheduled - 3239 // we should wait for this to complete too. 3240 drawingArea->waitForPossibleGeometryUpdate(DrawingAreaProxy::didUpdateBackingStoreStateTimeout * 0.5); 3241 drawingArea->waitForPossibleGeometryUpdate(DrawingAreaProxy::didUpdateBackingStoreStateTimeout * 0.5); 3242 } 3243 } 3244 3247 3245 - (BOOL)isUsingUISideCompositing 3248 3246 { -
trunk/Source/WebKit2/UIProcess/API/mac/WKViewInternal.h
r159760 r160296 24 24 */ 25 25 26 #import "WKView .h"26 #import "WKViewPrivate.h" 27 27 28 28 #import "PluginComplexTextInputState.h" … … 84 84 - (WebKit::ColorSpaceData)_colorSpace; 85 85 86 #if ENABLE(FULLSCREEN_API)87 - (BOOL)hasFullScreenWindowController;88 - (WKFullScreenWindowController*)fullScreenWindowController;89 - (void)closeFullScreenWindowController;90 #endif91 92 86 - (void)_cacheWindowBottomCornerRect; 93 87 … … 98 92 - (BOOL)_suppressVisibilityUpdates; 99 93 94 // FullScreen 95 96 @property (readonly) BOOL _hasFullScreenWindowController; 97 @property (readonly) WKFullScreenWindowController *_fullScreenWindowController; 98 - (void)_closeFullScreenWindowController; 99 100 100 @end -
trunk/Source/WebKit2/UIProcess/PageClient.h
r159985 r160296 44 44 OBJC_CLASS NSTextAlternatives; 45 45 #endif 46 47 #if PLATFORM(IOS)48 OBJC_CLASS UIWKView;49 #endif50 46 #endif 51 47 … … 60 56 class FindIndicator; 61 57 class NativeWebKeyboardEvent; 62 #if ENABLE(TOUCH_EVENTS)63 class NativeWebTouchEvent;64 #endif65 58 class WebContextMenuProxy; 66 59 class WebEditCommandProxy; 67 60 class WebPopupMenuProxy; 61 62 #if ENABLE(TOUCH_EVENTS) 63 class NativeWebTouchEvent; 64 #endif 65 68 66 #if ENABLE(INPUT_TYPE_COLOR) 69 67 class WebColorPicker; 68 #endif 69 70 #if ENABLE(FULLSCREEN_API) 71 class WebFullScreenManagerProxyClient; 70 72 #endif 71 73 … … 243 245 virtual bool interpretKeyEvent(const NativeWebKeyboardEvent&, bool isCharEvent) = 0; 244 246 #endif 247 248 // Auxiliary Client Creation 249 #if ENABLE(FULLSCREEN_API) 250 virtual WebFullScreenManagerProxyClient& fullScreenManagerProxyClient() = 0; 251 #endif 245 252 }; 246 253 -
trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.cpp
r159903 r160296 29 29 #if ENABLE(FULLSCREEN_API) 30 30 31 #include "WebContext.h"32 31 #include "WebFullScreenManagerMessages.h" 33 32 #include "WebFullScreenManagerProxyMessages.h" 33 #include "WebPageProxy.h" 34 #include "WebProcessProxy.h" 35 #include <WebCore/IntRect.h> 36 37 using namespace WebCore; 34 38 35 39 namespace WebKit { 36 40 37 PassRefPtr<WebFullScreenManagerProxy> WebFullScreenManagerProxy::create(WebPageProxy * page)41 PassRefPtr<WebFullScreenManagerProxy> WebFullScreenManagerProxy::create(WebPageProxy& page, WebFullScreenManagerProxyClient& client) 38 42 { 39 return adoptRef(new WebFullScreenManagerProxy(page ));43 return adoptRef(new WebFullScreenManagerProxy(page, client)); 40 44 } 41 45 42 WebFullScreenManagerProxy::WebFullScreenManagerProxy(WebPageProxy * page)43 : m_page( page)44 , m_ webView(0)46 WebFullScreenManagerProxy::WebFullScreenManagerProxy(WebPageProxy& page, WebFullScreenManagerProxyClient& client) 47 : m_page(&page) 48 , m_client(&client) 45 49 #if PLATFORM(EFL) 46 50 , m_hasRequestedFullScreen(false) … … 52 56 WebFullScreenManagerProxy::~WebFullScreenManagerProxy() 53 57 { 54 }55 56 void WebFullScreenManagerProxy::setWebView(PlatformWebView* webView)57 {58 m_webView = webView;59 58 } 60 59 … … 104 103 } 105 104 105 void WebFullScreenManagerProxy::invalidate() 106 { 107 m_page->process().removeMessageReceiver(Messages::WebFullScreenManagerProxy::messageReceiverName(), m_page->pageID()); 108 109 if (!m_client) 110 return; 111 112 m_client->closeFullScreenManager(); 113 m_client = nullptr; 114 } 115 116 void WebFullScreenManagerProxy::close() 117 { 118 if (!m_client) 119 return; 120 m_client->closeFullScreenManager(); 121 } 122 123 bool WebFullScreenManagerProxy::isFullScreen() 124 { 125 if (!m_client) 126 return false; 127 return m_client->isFullScreen(); 128 } 129 130 void WebFullScreenManagerProxy::enterFullScreen() 131 { 132 if (!m_client) 133 return; 134 m_client->enterFullScreen(); 135 } 136 137 void WebFullScreenManagerProxy::exitFullScreen() 138 { 139 if (!m_client) 140 return; 141 m_client->exitFullScreen(); 142 } 143 144 void WebFullScreenManagerProxy::beganEnterFullScreen(const IntRect& initialFrame, const IntRect& finalFrame) 145 { 146 if (!m_client) 147 return; 148 m_client->beganEnterFullScreen(initialFrame, finalFrame); 149 } 150 151 void WebFullScreenManagerProxy::beganExitFullScreen(const IntRect& initialFrame, const IntRect& finalFrame) 152 { 153 if (!m_client) 154 return; 155 m_client->beganExitFullScreen(initialFrame, finalFrame); 156 } 157 106 158 } // namespace WebKit 107 159 -
trunk/Source/WebKit2/UIProcess/WebFullScreenManagerProxy.h
r156847 r160296 38 38 } 39 39 40 #if PLATFORM(MAC)41 OBJC_CLASS WKView;42 #elif PLATFORM(GTK)43 typedef struct _WebKitWebViewBase WebKitWebViewBase;44 #endif45 46 40 namespace WebKit { 47 48 #if PLATFORM(MAC)49 typedef WKView PlatformWebView;50 #elif PLATFORM(GTK)51 typedef WebKitWebViewBase PlatformWebView;52 #elif PLATFORM(EFL)53 typedef Evas_Object PlatformWebView;54 #endif55 41 56 42 class WebPageProxy; 57 class LayerTreeContext; 43 44 class WebFullScreenManagerProxyClient { 45 public: 46 virtual ~WebFullScreenManagerProxyClient() { } 47 48 virtual void closeFullScreenManager() = 0; 49 virtual bool isFullScreen() = 0; 50 virtual void enterFullScreen() = 0; 51 virtual void exitFullScreen() = 0; 52 virtual void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) = 0; 53 virtual void beganExitFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame) = 0; 54 }; 58 55 59 56 class WebFullScreenManagerProxy : public RefCounted<WebFullScreenManagerProxy>, public CoreIPC::MessageReceiver { 60 57 public: 61 static PassRefPtr<WebFullScreenManagerProxy> create(WebPageProxy *);58 static PassRefPtr<WebFullScreenManagerProxy> create(WebPageProxy&, WebFullScreenManagerProxyClient&); 62 59 virtual ~WebFullScreenManagerProxy(); 63 60 64 61 void invalidate(); 65 62 66 void setWebView(PlatformWebView*);67 63 bool isFullScreen(); 68 64 void close(); … … 78 74 79 75 private: 80 explicit WebFullScreenManagerProxy(WebPageProxy *);76 explicit WebFullScreenManagerProxy(WebPageProxy&, WebFullScreenManagerProxyClient&); 81 77 82 78 void supportsFullScreen(bool withKeyboard, bool&); … … 90 86 91 87 WebPageProxy* m_page; 92 PlatformWebView* m_webView;88 WebFullScreenManagerProxyClient* m_client; 93 89 94 90 #if PLATFORM(EFL) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r160137 r160296 336 336 #endif 337 337 #if ENABLE(FULLSCREEN_API) 338 m_fullScreenManager = WebFullScreenManagerProxy::create( this);338 m_fullScreenManager = WebFullScreenManagerProxy::create(*this, m_pageClient.fullScreenManagerProxyClient()); 339 339 #endif 340 340 #if ENABLE(VIBRATION) … … 479 479 #endif 480 480 #if ENABLE(FULLSCREEN_API) 481 m_fullScreenManager = WebFullScreenManagerProxy::create( this);481 m_fullScreenManager = WebFullScreenManagerProxy::create(*this, m_pageClient.fullScreenManagerProxyClient()); 482 482 #endif 483 483 -
trunk/Source/WebKit2/UIProcess/mac/WKFullScreenWindowController.mm
r159760 r160296 350 350 - (void)beganExitFullScreenWithInitialFrame:(const WebCore::IntRect&)initialFrame finalFrame:(const WebCore::IntRect&)finalFrame 351 351 { 352 353 352 if (_fullScreenState != WaitingToExitFullScreen) 354 353 return; -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r160278 r160296 1229 1229 CDCA85C8132ABA4E00E961DF /* WKFullScreenWindowController.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA85C6132ABA4E00E961DF /* WKFullScreenWindowController.mm */; }; 1230 1230 CDCA85C9132ABA4E00E961DF /* WKFullScreenWindowController.h in Headers */ = {isa = PBXBuildFile; fileRef = CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */; }; 1231 CDCA85EE132AD70100E961DF /* WebFullScreenManagerProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDCA85DE132AD05300E961DF /* WebFullScreenManagerProxyMac.mm */; };1232 1231 CDDF622F1728A20D001EC01F /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BCD0042C110C1E27003B8A67 /* CoreServices.framework */; }; 1233 1232 CEDA12E2152CD1AE00D9E08D /* WebAlternativeTextClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEDA12DF152CCAE800D9E08D /* WebAlternativeTextClient.cpp */; }; … … 2844 2843 CDCA85C7132ABA4E00E961DF /* WKFullScreenWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKFullScreenWindowController.h; sourceTree = "<group>"; }; 2845 2844 CDCA85D4132AC2B300E961DF /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = /System/Library/Frameworks/IOKit.framework; sourceTree = "<absolute>"; }; 2846 CDCA85DE132AD05300E961DF /* WebFullScreenManagerProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebFullScreenManagerProxyMac.mm; sourceTree = "<group>"; };2847 2845 CEDA12DE152CCAE800D9E08D /* WebAlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAlternativeTextClient.h; sourceTree = "<group>"; }; 2848 2846 CEDA12DF152CCAE800D9E08D /* WebAlternativeTextClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAlternativeTextClient.cpp; sourceTree = "<group>"; }; … … 5245 5243 51ACBB9F127A8F2C00D203B9 /* WebContextMenuProxyMac.mm */, 5246 5244 F6D632BA133D181B00743D77 /* WebCookieManagerProxyMac.mm */, 5247 CDCA85DE132AD05300E961DF /* WebFullScreenManagerProxyMac.mm */,5248 5245 1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */, 5249 5246 BC857E8512B71EBB00EDEB2E /* WebPageProxyMac.mm */, … … 7268 7265 CD73BA4E131ACDB700EEDED2 /* WebFullScreenManagerMessageReceiver.cpp in Sources */, 7269 7266 CD6F75F4131B66D000D6B21E /* WebFullScreenManagerProxy.cpp in Sources */, 7270 CDCA85EE132AD70100E961DF /* WebFullScreenManagerProxyMac.mm in Sources */,7271 7267 CD73BA47131ACC9A00EEDED2 /* WebFullScreenManagerProxyMessageReceiver.cpp in Sources */, 7272 7268 BC1BE1E112D54A410004A228 /* WebGeolocationClient.cpp in Sources */,
Note: See TracChangeset
for help on using the changeset viewer.