summaryrefslogtreecommitdiff
path: root/Source/WebKit/mac/WebView/WebViewPrivate.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit/mac/WebView/WebViewPrivate.h')
-rw-r--r--Source/WebKit/mac/WebView/WebViewPrivate.h36
1 files changed, 35 insertions, 1 deletions
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<WebGeolocationProvider>)locationProvider;
- (id<WebGeolocationProvider>)_geolocationProvider;
@@ -709,6 +733,16 @@ Could be worth adding to the API.
- (void)_geolocationDidFailWithError:(NSError *)error;
@end
+@interface WebView (WebViewNotification)
+- (void)_setNotificationProvider:(id<WebNotificationProvider>)notificationProvider;
+- (id<WebNotificationProvider>)_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