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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 String icon() const { return m_iconUrl; } | 76 String icon() const { return m_iconUrl; } |
77 | 77 |
78 TextDirection direction() const; | 78 TextDirection direction() const; |
79 KURL iconURL() const { return m_iconUrl; } | 79 KURL iconURL() const { return m_iconUrl; } |
80 | 80 |
81 static const String& permissionString(NotificationClient::Permission); | 81 static const String& permissionString(NotificationClient::Permission); |
82 static const String& permission(ExecutionContext*); | 82 static const String& permission(ExecutionContext*); |
83 static void requestPermission(ExecutionContext*, NotificationPermissionCallb
ack* = nullptr); | 83 static void requestPermission(ExecutionContext*, NotificationPermissionCallb
ack* = nullptr); |
84 | 84 |
85 // EventTarget interface. | 85 // EventTarget interface. |
86 virtual ExecutionContext* executionContext() const OVERRIDE FINAL { return A
ctiveDOMObject::executionContext(); } | 86 virtual ExecutionContext* executionContext() const override final { return A
ctiveDOMObject::executionContext(); } |
87 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) OVERRIDE FINAL; | 87 virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>) override final; |
88 virtual const AtomicString& interfaceName() const OVERRIDE; | 88 virtual const AtomicString& interfaceName() const override; |
89 | 89 |
90 // ActiveDOMObject interface. | 90 // ActiveDOMObject interface. |
91 virtual void stop() OVERRIDE; | 91 virtual void stop() override; |
92 virtual bool hasPendingActivity() const OVERRIDE; | 92 virtual bool hasPendingActivity() const override; |
93 | 93 |
94 private: | 94 private: |
95 Notification(const String& title, ExecutionContext*, NotificationClient*); | 95 Notification(const String& title, ExecutionContext*, NotificationClient*); |
96 | 96 |
97 // Calling show() may start asynchronous operation. If this object has | 97 // Calling show() may start asynchronous operation. If this object has |
98 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being | 98 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being |
99 // collected while m_state is Showing, and so this instance stays alive | 99 // collected while m_state is Showing, and so this instance stays alive |
100 // until the operation completes. Otherwise, you need to hold a ref on this | 100 // until the operation completes. Otherwise, you need to hold a ref on this |
101 // instance until the operation completes. | 101 // instance until the operation completes. |
102 void show(); | 102 void show(); |
(...skipping 22 matching lines...) Expand all Loading... |
125 NotificationState m_state; | 125 NotificationState m_state; |
126 | 126 |
127 NotificationClient* m_client; | 127 NotificationClient* m_client; |
128 | 128 |
129 AsyncMethodRunner<Notification> m_asyncRunner; | 129 AsyncMethodRunner<Notification> m_asyncRunner; |
130 }; | 130 }; |
131 | 131 |
132 } // namespace blink | 132 } // namespace blink |
133 | 133 |
134 #endif // Notification_h | 134 #endif // Notification_h |
OLD | NEW |