Title: [108421] trunk/Source/WebKit/mac
- Revision
- 108421
- Author
- [email protected]
- Date
- 2012-02-21 17:01:31 -0800 (Tue, 21 Feb 2012)
Log Message
Build fix for r108409.
* WebCoreSupport/WebNotificationClient.h:
(WebCore):
* WebCoreSupport/WebNotificationClient.mm:
* WebView/WebNotification.h:
(WebSecurityOrigin):
* WebView/WebNotification.mm:
(core):
(-[WebNotification initWithCoreNotification:notificationID:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (108420 => 108421)
--- trunk/Source/WebKit/mac/ChangeLog 2012-02-22 00:49:48 UTC (rev 108420)
+++ trunk/Source/WebKit/mac/ChangeLog 2012-02-22 01:01:31 UTC (rev 108421)
@@ -1,5 +1,18 @@
2012-02-21 Jon Lee <[email protected]>
+ Build fix for r108409.
+
+ * WebCoreSupport/WebNotificationClient.h:
+ (WebCore):
+ * WebCoreSupport/WebNotificationClient.mm:
+ * WebView/WebNotification.h:
+ (WebSecurityOrigin):
+ * WebView/WebNotification.mm:
+ (core):
+ (-[WebNotification initWithCoreNotification:notificationID:]):
+
+2012-02-21 Jon Lee <[email protected]>
+
Bring notifications support to WK1 mac: permission requests
https://bugs.webkit.org/show_bug.cgi?id=78783
<rdar://problem/10610578>
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h (108420 => 108421)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h 2012-02-22 00:49:48 UTC (rev 108420)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.h 2012-02-22 01:01:31 UTC (rev 108421)
@@ -25,12 +25,15 @@
#import <WebCore/NotificationPresenter.h>
+#if ENABLE(NOTIFICATIONS)
#import <WebCore/Notification.h>
#import <wtf/HashMap.h>
#import <wtf/RefPtr.h>
#import <wtf/RetainPtr.h>
+#endif
namespace WebCore {
+class Notification;
class ScriptExecutionContext;
class VoidCallback;
}
@@ -54,10 +57,11 @@
virtual WebCore::NotificationPresenter::Permission checkPermission(WebCore::ScriptExecutionContext*) OVERRIDE;
WebView *m_webView;
+#if ENABLE(NOTIFICATIONS)
HashMap<uint64_t, RetainPtr<WebNotification> > m_notificationIDMap;
HashMap<RefPtr<WebCore::Notification>, uint64_t> m_notificationMap;
typedef HashMap<RefPtr<WebCore::ScriptExecutionContext>, Vector<uint64_t> > NotificationContextMap;
NotificationContextMap m_notificationContextMap;
-
+#endif
};
Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm (108420 => 108421)
--- trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm 2012-02-22 00:49:48 UTC (rev 108420)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebNotificationClient.mm 2012-02-22 01:01:31 UTC (rev 108421)
@@ -25,16 +25,13 @@
#import "WebNotificationClient.h"
-#import "WebNotificationInternal.h"
-#import "WebViewInternal.h"
-#import <WebCore/NotImplemented.h>
-#import <WebCore/Notification.h>
-
#if ENABLE(NOTIFICATIONS)
#import "WebDelegateImplementationCaching.h"
+#import "WebNotificationInternal.h"
#import "WebPreferencesPrivate.h"
#import "WebSecurityOriginInternal.h"
#import "WebUIDelegatePrivate.h"
+#import "WebViewInternal.h"
#import <WebCore/BlockExceptions.h>
#import <WebCore/Page.h>
#import <WebCore/ScriptExecutionContext.h>
Modified: trunk/Source/WebKit/mac/WebView/WebNotification.h (108420 => 108421)
--- trunk/Source/WebKit/mac/WebView/WebNotification.h 2012-02-22 00:49:48 UTC (rev 108420)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.h 2012-02-22 01:01:31 UTC (rev 108421)
@@ -26,14 +26,19 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#if ENABLE(NOTIFICATIONS)
@class WebNotificationPrivate;
@class WebSecurityOrigin;
+#endif
@interface WebNotification : NSObject
{
+#if ENABLE(NOTIFICATIONS)
WebNotificationPrivate *_private;
+#endif
}
+#if ENABLE(NOTIFICATIONS)
- (NSString *)title;
- (NSString *)body;
- (WebSecurityOrigin *)origin;
@@ -43,5 +48,6 @@
- (void)dispatchCloseEvent;
- (void)dispatchClickEvent;
- (void)dispatchErrorEvent;
+#endif
@end
Modified: trunk/Source/WebKit/mac/WebView/WebNotification.mm (108420 => 108421)
--- trunk/Source/WebKit/mac/WebView/WebNotification.mm 2012-02-22 00:49:48 UTC (rev 108420)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.mm 2012-02-22 01:01:31 UTC (rev 108421)
@@ -28,6 +28,8 @@
#import "WebNotification.h"
+#if ENABLE(NOTIFICATIONS)
+
#import "WebNotificationInternal.h"
#import "WebSecurityOriginInternal.h"
#import <WebCore/Notification.h>
@@ -42,7 +44,7 @@
@interface WebNotificationPrivate : NSObject
{
@public
- WebNotificationInternal *_internal;
+ RefPtr<Notification> _internal;
uint64_t _notificationID;
}
@end
@@ -50,27 +52,24 @@
@implementation WebNotificationPrivate
@end
-#if ENABLE(NOTIFICATIONS)
@implementation WebNotification (WebNotificationInternal)
Notification* core(WebNotification *notification)
{
if (!notification->_private)
return 0;
- return reinterpret_cast<Notification*>(notification->_private->_internal);
+ return notification->_private->_internal.get();
}
- (id)initWithCoreNotification:(Notification*)coreNotification notificationID:(uint64_t)notificationID
{
if (!(self = [super init]))
return nil;
- coreNotification->ref();
_private = [[WebNotificationPrivate alloc] init];
- _private->_internal = reinterpret_cast<WebNotificationInternal*>(coreNotification);
+ _private->_internal = coreNotification;
_private->_notificationID = notificationID;
return self;
}
@end
-#endif
@implementation WebNotification
- (id)init
@@ -78,15 +77,6 @@
return nil;
}
-- (void)dealloc
-{
- Notification* notification = core(self);
- if (notification)
- notification->deref();
-
- [super dealloc];
-}
-
- (NSString *)title
{
ASSERT(core(self));
@@ -136,3 +126,11 @@
}
@end
+
+#else
+
+@implementation WebNotification
+@end
+
+#endif // ENABLE(NOTIFICATIONS)
+
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes