Build fix. Push ENABLE_NOTIFICATIONS into .mm file.
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 02:35:55 +0000 (02:35 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 22 Feb 2012 02:35:55 +0000 (02:35 +0000)
* 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]):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108429 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebNotification.h
Source/WebKit/mac/WebView/WebNotification.mm

index 552c340..a980a0b 100644 (file)
@@ -1,3 +1,19 @@
+2012-02-21  Jon Lee  <jonlee@apple.com>
+
+        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  <sullivan@apple.com>
 
         Build fix.
index d258064..c04b2ad 100644 (file)
  * 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
index 2a09c77..bbd0248 100644 (file)
 
 #import "WebNotification.h"
 
-#if ENABLE(NOTIFICATIONS)
-
 #import "WebNotificationInternal.h"
+
+#if ENABLE(NOTIFICATIONS)
 #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 @@ Notification* core(WebNotification *notification)
     return self;
 }
 @end
+#endif
 
 @implementation WebNotification
 - (id)init
@@ -79,58 +83,75 @@ Notification* core(WebNotification *notification)
 
 - (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)
-