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

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

Issue 1254423011: Add Notification.maxActions so websites know how many buttons we support (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@staticreadonlypeter
Patch Set: Address review nits Created 5 years, 4 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
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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 TextDirection direction() const; 97 TextDirection direction() const;
98 KURL iconURL() const { return m_iconUrl; } 98 KURL iconURL() const { return m_iconUrl; }
99 SerializedScriptValue* serializedData() const { return m_serializedData.get( ); } 99 SerializedScriptValue* serializedData() const { return m_serializedData.get( ); }
100 100
101 static String permissionString(WebNotificationPermission); 101 static String permissionString(WebNotificationPermission);
102 static String permission(ExecutionContext*); 102 static String permission(ExecutionContext*);
103 static WebNotificationPermission checkPermission(ExecutionContext*); 103 static WebNotificationPermission checkPermission(ExecutionContext*);
104 static void requestPermission(ExecutionContext*, NotificationPermissionCallb ack* = nullptr); 104 static void requestPermission(ExecutionContext*, NotificationPermissionCallb ack* = nullptr);
105 105
106 static unsigned maxActions();
107
106 // EventTarget interface. 108 // EventTarget interface.
107 ExecutionContext* executionContext() const final { return ActiveDOMObject::e xecutionContext(); } 109 ExecutionContext* executionContext() const final { return ActiveDOMObject::e xecutionContext(); }
108 const AtomicString& interfaceName() const override; 110 const AtomicString& interfaceName() const override;
109 111
110 // ActiveDOMObject interface. 112 // ActiveDOMObject interface.
111 void stop() override; 113 void stop() override;
112 bool hasPendingActivity() const override; 114 bool hasPendingActivity() const override;
113 115
114 DECLARE_VIRTUAL_TRACE(); 116 DECLARE_VIRTUAL_TRACE();
115 117
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 void setState(NotificationState state) { m_state = state; } 171 void setState(NotificationState state) { m_state = state; }
170 172
171 NotificationState m_state; 173 NotificationState m_state;
172 174
173 AsyncMethodRunner<Notification> m_asyncRunner; 175 AsyncMethodRunner<Notification> m_asyncRunner;
174 }; 176 };
175 177
176 } // namespace blink 178 } // namespace blink
177 179
178 #endif // Notification_h 180 #endif // Notification_h
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/notifications/notification-properties.html ('k') | Source/modules/notifications/Notification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698