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

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

Issue 901843006: Allow the embedder to disable the Notification constructor. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 class NotificationPermissionCallback; 49 class NotificationPermissionCallback;
50 struct WebNotificationData; 50 struct WebNotificationData;
51 51
52 class Notification final : public RefCountedGarbageCollectedEventTargetWithInlin eData<Notification>, public ActiveDOMObject, public WebNotificationDelegate { 52 class Notification final : public RefCountedGarbageCollectedEventTargetWithInlin eData<Notification>, public ActiveDOMObject, public WebNotificationDelegate {
53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<N otification>); 53 DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCountedGarbageCollected<N otification>);
54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Notification); 54 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Notification);
55 DEFINE_WRAPPERTYPEINFO(); 55 DEFINE_WRAPPERTYPEINFO();
56 public: 56 public:
57 // Used for JavaScript instantiations of the Notification object. Will autom atically schedule for 57 // Used for JavaScript instantiations of the Notification object. Will autom atically schedule for
58 // the notification to be displayed to the user. 58 // the notification to be displayed to the user.
59 static Notification* create(ExecutionContext*, const String& title, const No tificationOptions&); 59 static Notification* create(ExecutionContext*, const String& title, const No tificationOptions&, ExceptionState&);
60 60
61 // Used for embedder-created Notification objects. Will initialize the Notif ication's state as showing. 61 // Used for embedder-created Notification objects. Will initialize the Notif ication's state as showing.
62 static Notification* create(ExecutionContext*, const String& persistentId, c onst WebNotificationData&); 62 static Notification* create(ExecutionContext*, const String& persistentId, c onst WebNotificationData&);
63 63
64 virtual ~Notification(); 64 virtual ~Notification();
65 65
66 void close(); 66 void close();
67 67
68 DEFINE_ATTRIBUTE_EVENT_LISTENER(click); 68 DEFINE_ATTRIBUTE_EVENT_LISTENER(click);
69 DEFINE_ATTRIBUTE_EVENT_LISTENER(show); 69 DEFINE_ATTRIBUTE_EVENT_LISTENER(show);
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 void setState(NotificationState state) { m_state = state; } 148 void setState(NotificationState state) { m_state = state; }
149 149
150 NotificationState m_state; 150 NotificationState m_state;
151 151
152 AsyncMethodRunner<Notification> m_asyncRunner; 152 AsyncMethodRunner<Notification> m_asyncRunner;
153 }; 153 };
154 154
155 } // namespace blink 155 } // namespace blink
156 156
157 #endif // Notification_h 157 #endif // Notification_h
OLDNEW
« no previous file with comments | « no previous file | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698