Title: [108429] trunk/Source/WebKit/mac
Revision
108429
Author
[email protected]
Date
2012-02-21 18:35:55 -0800 (Tue, 21 Feb 2012)

Log Message

Build fix. Push ENABLE_NOTIFICATIONS into .mm file.

* WebCoreSupport/WebNotificationClient.h:
* WebView/WebNotification.h:
* WebView/WebNotification.mm:
(-[WebNotification title]):
(-[WebNotification body]):
(-[WebNotification origin]):
(-[WebNotification notificationID]):
(-[WebNotification dispatchShowEvent]):
(-[WebNotification dispatchCloseEvent]):
(-[WebNotification dispatchClickEvent]):
(-[WebNotification dispatchErrorEvent]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (108428 => 108429)


--- trunk/Source/WebKit/mac/ChangeLog	2012-02-22 02:22:15 UTC (rev 108428)
+++ trunk/Source/WebKit/mac/ChangeLog	2012-02-22 02:35:55 UTC (rev 108429)
@@ -1,3 +1,19 @@
+2012-02-21  Jon Lee  <[email protected]>
+
+        Build fix. Push ENABLE_NOTIFICATIONS into .mm file.
+
+        * WebCoreSupport/WebNotificationClient.h:
+        * WebView/WebNotification.h:
+        * WebView/WebNotification.mm:
+        (-[WebNotification title]):
+        (-[WebNotification body]):
+        (-[WebNotification origin]):
+        (-[WebNotification notificationID]):
+        (-[WebNotification dispatchShowEvent]):
+        (-[WebNotification dispatchCloseEvent]):
+        (-[WebNotification dispatchClickEvent]):
+        (-[WebNotification dispatchErrorEvent]):
+
 2012-02-21  John Sullivan  <[email protected]>
 
         Build fix.

Modified: trunk/Source/WebKit/mac/WebView/WebNotification.h (108428 => 108429)


--- trunk/Source/WebKit/mac/WebView/WebNotification.h	2012-02-22 02:22:15 UTC (rev 108428)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.h	2012-02-22 02:35:55 UTC (rev 108429)
@@ -26,19 +26,14 @@
  * 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;
@@ -48,6 +43,5 @@
 - (void)dispatchCloseEvent;
 - (void)dispatchClickEvent;
 - (void)dispatchErrorEvent;
-#endif
 
 @end

Modified: trunk/Source/WebKit/mac/WebView/WebNotification.mm (108428 => 108429)


--- trunk/Source/WebKit/mac/WebView/WebNotification.mm	2012-02-22 02:22:15 UTC (rev 108428)
+++ trunk/Source/WebKit/mac/WebView/WebNotification.mm	2012-02-22 02:35:55 UTC (rev 108429)
@@ -28,30 +28,33 @@
 
 #import "WebNotification.h"
 
+#import "WebNotificationInternal.h"
+
 #if ENABLE(NOTIFICATIONS)
-
-#import "WebNotificationInternal.h"
 #import "WebSecurityOriginInternal.h"
 #import <WebCore/Notification.h>
 #import <WebCore/ScriptExecutionContext.h>
-#import <wtf/PassRefPtr.h>
 #import <wtf/RefPtr.h>
 
 using namespace WebCore;
+#endif
 
 OBJC_CLASS WebNotificationInternal;
 
 @interface WebNotificationPrivate : NSObject
 {
 @public
+#if ENABLE(NOTIFICATIONS)
     RefPtr<Notification> _internal;
     uint64_t _notificationID;
+#endif
 }
 @end
 
 @implementation WebNotificationPrivate
 @end
 
+#if ENABLE(NOTIFICATIONS)
 @implementation WebNotification (WebNotificationInternal)
 Notification* core(WebNotification *notification)
 {
@@ -70,6 +73,7 @@
     return self;
 }
 @end
+#endif
 
 @implementation WebNotification
 - (id)init
@@ -79,58 +83,75 @@
 
 - (NSString *)title
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     return core(self)->contents().title;
+#else
+    return nil;
+#endif
 }
 
 - (NSString *)body
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     return core(self)->contents().body;
+#else
+    return nil;
+#endif
 }
 
 - (WebSecurityOrigin *)origin
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     return [[[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:core(self)->scriptExecutionContext()->securityOrigin()] autorelease];
+#else
+    return nil;
+#endif
 }
 
 - (uint64_t)notificationID
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     return _private->_notificationID;
+#else
+    return 0;
+#endif
 }
 
 - (void)dispatchShowEvent
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     core(self)->dispatchShowEvent();
+#endif
 }
 
 - (void)dispatchCloseEvent
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     core(self)->dispatchCloseEvent();
+#endif
 }
 
 - (void)dispatchClickEvent
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     core(self)->dispatchClickEvent();
+#endif
 }
 
 - (void)dispatchErrorEvent
 {
+#if ENABLE(NOTIFICATIONS)
     ASSERT(core(self));
     core(self)->dispatchErrorEvent();
+#endif
 }
 
 @end
 
-#else
-
-@implementation WebNotification
-@end
-
-#endif // ENABLE(NOTIFICATIONS)
-
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to