OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "bindings/v8/ExceptionState.h" | 36 #include "bindings/v8/ExceptionState.h" |
37 #include "bindings/v8/ScriptWrappable.h" | 37 #include "bindings/v8/ScriptWrappable.h" |
38 #include "core/dom/ExecutionContext.h" | 38 #include "core/dom/ExecutionContext.h" |
39 #include "modules/notifications/NotificationCenter.h" | 39 #include "modules/notifications/NotificationCenter.h" |
40 #include "modules/notifications/NotificationClient.h" | 40 #include "modules/notifications/NotificationClient.h" |
41 | 41 |
42 namespace WebCore { | 42 namespace WebCore { |
43 | 43 |
44 PassRefPtrWillBeRawPtr<WebKitNotification> WebKitNotification::create(const Stri
ng& title, const String& body, const String& iconUrl, ExecutionContext* context,
ExceptionState& es, PassRefPtrWillBeRawPtr<NotificationCenter> provider) | 44 PassRefPtrWillBeRawPtr<WebKitNotification> WebKitNotification::create(const Stri
ng& title, const String& body, const String& iconUrl, ExecutionContext* context,
ExceptionState& es, PassRefPtrWillBeRawPtr<NotificationCenter> provider) |
45 { | 45 { |
46 RefPtrWillBeRawPtr<WebKitNotification> notification = adoptRefCountedWillBeR
efCountedGarbageCollected(new WebKitNotification(title, body, iconUrl, context,
es, provider)); | 46 RefPtrWillBeRawPtr<WebKitNotification> notification = adoptRefWillBeRefCount
edGarbageCollected(new WebKitNotification(title, body, iconUrl, context, es, pro
vider)); |
47 notification->suspendIfNeeded(); | 47 notification->suspendIfNeeded(); |
48 | 48 |
49 return notification.release(); | 49 return notification.release(); |
50 } | 50 } |
51 | 51 |
52 WebKitNotification::WebKitNotification(const String& title, const String& body,
const String& iconUrl, ExecutionContext* context, ExceptionState& es, PassRefPtr
WillBeRawPtr<NotificationCenter> provider) | 52 WebKitNotification::WebKitNotification(const String& title, const String& body,
const String& iconUrl, ExecutionContext* context, ExceptionState& es, PassRefPtr
WillBeRawPtr<NotificationCenter> provider) |
53 : NotificationBase(title, context, provider->client()) | 53 : NotificationBase(title, context, provider->client()) |
54 { | 54 { |
55 ScriptWrappable::init(this); | 55 ScriptWrappable::init(this); |
56 | 56 |
(...skipping 17 matching lines...) Expand all Loading... |
74 } | 74 } |
75 | 75 |
76 const AtomicString& WebKitNotification::interfaceName() const | 76 const AtomicString& WebKitNotification::interfaceName() const |
77 { | 77 { |
78 return EventTargetNames::WebKitNotification; | 78 return EventTargetNames::WebKitNotification; |
79 } | 79 } |
80 | 80 |
81 } // namespace WebCore | 81 } // namespace WebCore |
82 | 82 |
83 #endif // ENABLE(LEGACY_NOTIFICATIONS) | 83 #endif // ENABLE(LEGACY_NOTIFICATIONS) |
OLD | NEW |