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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 namespace blink { 52 namespace blink {
53 53
54 class ExecutionContext; 54 class ExecutionContext;
55 class NotificationAction; 55 class NotificationAction;
56 class NotificationOptions; 56 class NotificationOptions;
57 class NotificationPermissionCallback; 57 class NotificationPermissionCallback;
58 class ScriptState; 58 class ScriptState;
59 59
60 class MODULES_EXPORT Notification final : public RefCountedGarbageCollectedEvent TargetWithInlineData<Notification>, public ActiveDOMObject, public WebNotificati onDelegate { 60 class MODULES_EXPORT Notification final : public RefCountedGarbageCollectedEvent TargetWithInlineData<Notification>, public ActiveDOMObject, public WebNotificati onDelegate {
61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Notification); 61 REFCOUNTED_GARBAGE_COLLECTED_EVENT_TARGET(Notification);
62 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(Notification); 62 USING_GARBAGE_COLLECTED_MIXIN(Notification);
63 DEFINE_WRAPPERTYPEINFO(); 63 DEFINE_WRAPPERTYPEINFO();
64 public: 64 public:
65 // Used for JavaScript instantiations of the Notification object. Will autom atically schedule for 65 // Used for JavaScript instantiations of the Notification object. Will autom atically schedule for
66 // the notification to be displayed to the user when the developer-provided data is valid. 66 // the notification to be displayed to the user when the developer-provided data is valid.
67 static Notification* create(ExecutionContext*, const String& title, const No tificationOptions&, ExceptionState&); 67 static Notification* create(ExecutionContext*, const String& title, const No tificationOptions&, ExceptionState&);
68 68
69 // Used for embedder-created Notification objects. If |showing| is true, wil l initialize the 69 // Used for embedder-created Notification objects. If |showing| is true, wil l initialize the
70 // Notification's state as showing, or as closed otherwise. 70 // Notification's state as showing, or as closed otherwise.
71 static Notification* create(ExecutionContext*, int64_t persistentId, const W ebNotificationData&, bool showing); 71 static Notification* create(ExecutionContext*, int64_t persistentId, const W ebNotificationData&, bool showing);
72 72
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const AtomicString& interfaceName() const override; 110 const AtomicString& interfaceName() const override;
111 111
112 // ActiveDOMObject interface. 112 // ActiveDOMObject interface.
113 void stop() override; 113 void stop() override;
114 bool hasPendingActivity() const override; 114 bool hasPendingActivity() const override;
115 115
116 DECLARE_VIRTUAL_TRACE(); 116 DECLARE_VIRTUAL_TRACE();
117 117
118 protected: 118 protected:
119 // EventTarget interface. 119 // EventTarget interface.
120 bool dispatchEventInternal(PassRefPtrWillBeRawPtr<Event>) final; 120 bool dispatchEventInternal(RawPtr<Event>) final;
121 121
122 private: 122 private:
123 Notification(ExecutionContext*, const WebNotificationData&); 123 Notification(ExecutionContext*, const WebNotificationData&);
124 124
125 void scheduleShow(); 125 void scheduleShow();
126 126
127 // Calling show() may start asynchronous operation. If this object has 127 // Calling show() may start asynchronous operation. If this object has
128 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being 128 // a V8 wrapper, hasPendingActivity() prevents the wrapper from being
129 // collected while m_state is Showing, and so this instance stays alive 129 // collected while m_state is Showing, and so this instance stays alive
130 // until the operation completes. Otherwise, you need to hold a ref on this 130 // until the operation completes. Otherwise, you need to hold a ref on this
(...skipping 24 matching lines...) Expand all
155 void setState(NotificationState state) { m_state = state; } 155 void setState(NotificationState state) { m_state = state; }
156 156
157 NotificationState m_state; 157 NotificationState m_state;
158 158
159 Member<AsyncMethodRunner<Notification>> m_asyncRunner; 159 Member<AsyncMethodRunner<Notification>> m_asyncRunner;
160 }; 160 };
161 161
162 } // namespace blink 162 } // namespace blink
163 163
164 #endif // Notification_h 164 #endif // Notification_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698