Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Side by Side Diff: Source/modules/notifications/NotificationCenter.h

Issue 15232002: Make remaining modules/ objects ScriptWrappable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 14 matching lines...) Expand all
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */ 30 */
31 31
32 #ifndef NotificationCenter_h 32 #ifndef NotificationCenter_h
33 #define NotificationCenter_h 33 #define NotificationCenter_h
34 34
35 #include "bindings/v8/ScriptWrappable.h"
35 #include "core/dom/ExceptionCode.h" 36 #include "core/dom/ExceptionCode.h"
36 #include "core/dom/ScriptExecutionContext.h" 37 #include "core/dom/ScriptExecutionContext.h"
37 #include "core/html/VoidCallback.h" 38 #include "core/html/VoidCallback.h"
38 #include "core/platform/Timer.h" 39 #include "core/platform/Timer.h"
39 #include "modules/notifications/Notification.h" 40 #include "modules/notifications/Notification.h"
40 #include "wtf/OwnPtr.h" 41 #include "wtf/OwnPtr.h"
41 #include "wtf/PassRefPtr.h" 42 #include "wtf/PassRefPtr.h"
42 #include "wtf/RefCounted.h" 43 #include "wtf/RefCounted.h"
43 #include "wtf/RefPtr.h" 44 #include "wtf/RefPtr.h"
44 45
45 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 46 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
46 47
47 namespace WebCore { 48 namespace WebCore {
48 49
49 class NotificationClient; 50 class NotificationClient;
50 class VoidCallback; 51 class VoidCallback;
51 52
52 class NotificationCenter : public RefCounted<NotificationCenter>, public ActiveD OMObject { 53 class NotificationCenter : public RefCounted<NotificationCenter>, public ScriptW rappable, public ActiveDOMObject {
53 public: 54 public:
54 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext*, Notifi cationClient*); 55 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext*, Notifi cationClient*);
55 56
56 #if ENABLE(LEGACY_NOTIFICATIONS) 57 #if ENABLE(LEGACY_NOTIFICATIONS)
57 PassRefPtr<Notification> createHTMLNotification(const String& URI, Exception Code& ec) 58 PassRefPtr<Notification> createHTMLNotification(const String& URI, Exception Code& ec)
58 { 59 {
59 if (!client()) { 60 if (!client()) {
60 ec = INVALID_STATE_ERR; 61 ec = INVALID_STATE_ERR;
61 return 0; 62 return 0;
62 } 63 }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 109
109 NotificationClient* m_client; 110 NotificationClient* m_client;
110 HashSet<RefPtr<NotificationRequestCallback> > m_callbacks; 111 HashSet<RefPtr<NotificationRequestCallback> > m_callbacks;
111 }; 112 };
112 113
113 } // namespace WebCore 114 } // namespace WebCore
114 115
115 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 116 #endif // ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
116 117
117 #endif // NotificationCenter_h 118 #endif // NotificationCenter_h
OLDNEW
« no previous file with comments | « Source/modules/notifications/Notification.cpp ('k') | Source/modules/notifications/NotificationCenter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698