From: jonlee@apple.com Date: Wed, 22 Feb 2012 02:35:55 +0000 (+0000) Subject: Build fix. Push ENABLE_NOTIFICATIONS into .mm file. X-Git-Tag: 070512121124~12223 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c92fdeaebce56aa79a7a8d2ed97416f682e49616;p=profile%2Fivi%2Fwebkit-efl.git 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]): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@108429 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- diff --git a/Source/WebKit/mac/ChangeLog b/Source/WebKit/mac/ChangeLog index 552c340..a980a0b 100644 --- a/Source/WebKit/mac/ChangeLog +++ b/Source/WebKit/mac/ChangeLog @@ -1,3 +1,19 @@ +2012-02-21 Jon Lee + + 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 Build fix. diff --git a/Source/WebKit/mac/WebView/WebNotification.h b/Source/WebKit/mac/WebView/WebNotification.h index d258064..c04b2ad 100644 --- a/Source/WebKit/mac/WebView/WebNotification.h +++ b/Source/WebKit/mac/WebView/WebNotification.h @@ -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 diff --git a/Source/WebKit/mac/WebView/WebNotification.mm b/Source/WebKit/mac/WebView/WebNotification.mm index 2a09c77..bbd0248 100644 --- a/Source/WebKit/mac/WebView/WebNotification.mm +++ b/Source/WebKit/mac/WebView/WebNotification.mm @@ -28,30 +28,33 @@ #import "WebNotification.h" -#if ENABLE(NOTIFICATIONS) - #import "WebNotificationInternal.h" + +#if ENABLE(NOTIFICATIONS) #import "WebSecurityOriginInternal.h" #import #import -#import #import using namespace WebCore; +#endif OBJC_CLASS WebNotificationInternal; @interface WebNotificationPrivate : NSObject { @public +#if ENABLE(NOTIFICATIONS) RefPtr _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) -