From ad0d549d4cc13433f77c1ac8f0ab379c83d93f28 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 24 Feb 2012 16:36:50 +0100 Subject: Imported WebKit commit bb52bf3c0119e8a128cd93afe5572413a8617de9 (http://svn.webkit.org/repository/webkit/trunk@108790) --- Source/WebKit/mac/WebView/WebViewPrivate.h | 36 +++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) (limited to 'Source/WebKit/mac/WebView/WebViewPrivate.h') diff --git a/Source/WebKit/mac/WebView/WebViewPrivate.h b/Source/WebKit/mac/WebView/WebViewPrivate.h index cd92f31e5..e0fee81d1 100644 --- a/Source/WebKit/mac/WebView/WebViewPrivate.h +++ b/Source/WebKit/mac/WebView/WebViewPrivate.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. + * Copyright (C) 2005-2012 Apple Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -39,8 +39,10 @@ @class WebDeviceOrientation; @class WebGeolocationPosition; @class WebInspector; +@class WebNotification; @class WebPreferences; @class WebScriptWorld; +@class WebSecurityOrigin; @class WebTextIterator; @protocol WebDeviceOrientationProvider; @@ -104,6 +106,13 @@ typedef enum { WebPaginationModeVertical, } WebPaginationMode; +// This needs to be in sync with WebCore::NotificationPresenter::Permission +typedef enum { + WebNotificationPermissionAllowed, + WebNotificationPermissionNotAllowed, + WebNotificationPermissionDenied +} WebNotificationPermission; + @interface WebController : NSTreeController { IBOutlet WebView *webView; } @@ -701,6 +710,21 @@ Could be worth adding to the API. - (WebGeolocationPosition *)lastPosition; @end +@protocol WebNotificationProvider +- (void)registerWebView:(WebView *)webView; +- (void)unregisterWebView:(WebView *)webView; + +- (void)showNotification:(WebNotification *)notification fromWebView:(WebView *)webView; +- (void)cancelNotification:(WebNotification *)notification; +- (void)notificationDestroyed:(WebNotification *)notification; +- (void)clearNotifications:(NSArray *)notificationIDs; +- (WebNotificationPermission)policyForOrigin:(WebSecurityOrigin *)origin; + +- (void)webView:(WebView *)webView didShowNotification:(uint64_t)notificationID; +- (void)webView:(WebView *)webView didClickNotification:(uint64_t)notificationID; +- (void)webView:(WebView *)webView didCloseNotifications:(NSArray *)notificationIDs; +@end + @interface WebView (WebViewGeolocation) - (void)_setGeolocationProvider:(id)locationProvider; - (id)_geolocationProvider; @@ -709,6 +733,16 @@ Could be worth adding to the API. - (void)_geolocationDidFailWithError:(NSError *)error; @end +@interface WebView (WebViewNotification) +- (void)_setNotificationProvider:(id)notificationProvider; +- (id)_notificationProvider; +- (void)_notificationControllerDestroyed; + +- (void)_notificationDidShow:(uint64_t)notificationID; +- (void)_notificationDidClick:(uint64_t)notificationID; +- (void)_notificationsDidClose:(NSArray *)notificationIDs; +@end + @interface WebView (WebViewPrivateStyleInfo) - (JSValueRef)_computedStyleIncludingVisitedInfo:(JSContextRef)context forElement:(JSValueRef)value; @end -- cgit v1.2.1