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

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

Issue 85263006: Make IDL Callbacks non-refcounted by default (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 7 years 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) 2009, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2009, 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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); } 120 virtual ExecutionContext* executionContext() const OVERRIDE { return ActiveD OMObject::executionContext(); }
121 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE; 121 virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
122 122
123 // ActiveDOMObject interface 123 // ActiveDOMObject interface
124 // Override to prevent this from being collected when in Showing state. 124 // Override to prevent this from being collected when in Showing state.
125 virtual bool hasPendingActivity() const OVERRIDE; 125 virtual bool hasPendingActivity() const OVERRIDE;
126 virtual void stop() OVERRIDE; 126 virtual void stop() OVERRIDE;
127 127
128 static const String& permission(ExecutionContext*); 128 static const String& permission(ExecutionContext*);
129 static const String& permissionString(NotificationClient::Permission); 129 static const String& permissionString(NotificationClient::Permission);
130 static void requestPermission(ExecutionContext*, PassRefPtr<NotificationPerm issionCallback> = 0); 130 static void requestPermission(ExecutionContext*, PassOwnPtr<NotificationPerm issionCallback> = nullptr);
131 131
132 private: 132 private:
133 #if ENABLE(LEGACY_NOTIFICATIONS) 133 #if ENABLE(LEGACY_NOTIFICATIONS)
134 Notification(const String& title, const String& body, const String& iconURI, ExecutionContext*, ExceptionState&, PassRefPtr<NotificationCenter>); 134 Notification(const String& title, const String& body, const String& iconURI, ExecutionContext*, ExceptionState&, PassRefPtr<NotificationCenter>);
135 #endif 135 #endif
136 Notification(ExecutionContext*, const String& title); 136 Notification(ExecutionContext*, const String& title);
137 137
138 void setLang(const String& lang) { m_lang = lang; } 138 void setLang(const String& lang) { m_lang = lang; }
139 void setBody(const String& body) { m_body = body; } 139 void setBody(const String& body) { m_body = body; }
140 void setIcon(const KURL& url) { m_icon = url; } 140 void setIcon(const KURL& url) { m_icon = url; }
(...skipping 18 matching lines...) Expand all
159 NotificationState m_state; 159 NotificationState m_state;
160 160
161 NotificationClient* m_notificationClient; 161 NotificationClient* m_notificationClient;
162 162
163 OwnPtr<AsyncMethodRunner<Notification> > m_asyncRunner; 163 OwnPtr<AsyncMethodRunner<Notification> > m_asyncRunner;
164 }; 164 };
165 165
166 } // namespace WebCore 166 } // namespace WebCore
167 167
168 #endif // Notifications_h 168 #endif // Notifications_h
OLDNEW
« no previous file with comments | « Source/modules/mediastream/UserMediaRequest.cpp ('k') | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698