Skip to content
Permalink
Browse files
[Mac] Add iconURL to WebNotification
https://bugs.webkit.org/show_bug.cgi?id=95249
<rdar://problem/12192060>

Reviewed by Jessie Berlin.

* WebView/WebNotification.h: Expose iconURL.
* WebView/WebNotification.mm: Remove unnecessary ASSERTs.
(-[WebNotification title]):
(-[WebNotification body]):
(-[WebNotification tag]):
(-[WebNotification iconURL]): Added.
(-[WebNotification origin]):
(-[WebNotification notificationID]):
(-[WebNotification dispatchShowEvent]):
(-[WebNotification dispatchCloseEvent]):
(-[WebNotification dispatchClickEvent]):
(-[WebNotification dispatchErrorEvent]):

Reviewed by Jessie Berlin.

* WebView/WebNotification.h: Expose iconURL.
* WebView/WebNotification.mm:
(-[WebNotification iconURL]):

Canonical link: https://commits.webkit.org/113183@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
qanat committed Aug 29, 2012
1 parent 5471418 commit d777dfa098e514b992d6685edc858f30ba400539
Showing 3 changed files with 38 additions and 9 deletions.
@@ -1,3 +1,31 @@
2012-08-29 Jon Lee <jonlee@apple.com>

[Mac] Add iconURL to WebNotification
https://bugs.webkit.org/show_bug.cgi?id=95249
<rdar://problem/12192060>

Reviewed by Jessie Berlin.

* WebView/WebNotification.h: Expose iconURL.
* WebView/WebNotification.mm: Remove unnecessary ASSERTs.
(-[WebNotification title]):
(-[WebNotification body]):
(-[WebNotification tag]):
(-[WebNotification iconURL]): Added.
(-[WebNotification origin]):
(-[WebNotification notificationID]):
(-[WebNotification dispatchShowEvent]):
(-[WebNotification dispatchCloseEvent]):
(-[WebNotification dispatchClickEvent]):
(-[WebNotification dispatchErrorEvent]):


Reviewed by Jessie Berlin.

* WebView/WebNotification.h: Expose iconURL.
* WebView/WebNotification.mm:
(-[WebNotification iconURL]):

2012-08-28 Geoffrey Garen <ggaren@apple.com>

Added JSScope::objectInScope(), and refactored callers to use it
@@ -37,6 +37,7 @@
- (NSString *)title;
- (NSString *)body;
- (NSString *)tag;
- (NSString *)iconURL;
- (WebSecurityOrigin *)origin;
- (uint64_t)notificationID;

@@ -84,7 +84,6 @@ - (id)init
- (NSString *)title
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return core(self)->title();
#else
return nil;
@@ -94,7 +93,6 @@ - (NSString *)title
- (NSString *)body
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return core(self)->body();
#else
return nil;
@@ -104,17 +102,24 @@ - (NSString *)body
- (NSString *)tag
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return core(self)->tag();
#else
return nil;
#endif
}

- (NSString *)iconURL
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
return core(self)->iconURL();
#else
return nil;
#endif
}

- (WebSecurityOrigin *)origin
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return [[[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:core(self)->scriptExecutionContext()->securityOrigin()] autorelease];
#else
return nil;
@@ -124,7 +129,6 @@ - (WebSecurityOrigin *)origin
- (uint64_t)notificationID
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
return _private->_notificationID;
#else
return 0;
@@ -134,31 +138,27 @@ - (uint64_t)notificationID
- (void)dispatchShowEvent
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchShowEvent();
#endif
}

- (void)dispatchCloseEvent
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchCloseEvent();
#endif
}

- (void)dispatchClickEvent
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchClickEvent();
#endif
}

- (void)dispatchErrorEvent
{
#if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
ASSERT(core(self));
core(self)->dispatchErrorEvent();
#endif
}

0 comments on commit d777dfa

Please sign in to comment.