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

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

Issue 26878003: Reduce repetitive EventTarget subclassing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix nit Created 7 years, 2 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 | « Source/modules/notifications/Notification.h ('k') | Source/modules/speech/SpeechRecognition.h » ('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) 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 case Idle: 160 case Idle:
161 break; 161 break;
162 case Showing: 162 case Showing:
163 m_notificationClient->cancel(this); 163 m_notificationClient->cancel(this);
164 break; 164 break;
165 case Closed: 165 case Closed:
166 break; 166 break;
167 } 167 }
168 } 168 }
169 169
170 EventTargetData* Notification::eventTargetData()
171 {
172 return &m_eventTargetData;
173 }
174
175 EventTargetData* Notification::ensureEventTargetData()
176 {
177 return &m_eventTargetData;
178 }
179
180 void Notification::contextDestroyed() 170 void Notification::contextDestroyed()
181 { 171 {
182 ActiveDOMObject::contextDestroyed(); 172 ActiveDOMObject::contextDestroyed();
183 m_notificationClient->notificationObjectDestroyed(this); 173 m_notificationClient->notificationObjectDestroyed(this);
184 } 174 }
185 175
186 void Notification::finalize() 176 void Notification::finalize()
187 { 177 {
188 if (m_state == Closed) 178 if (m_state == Closed)
189 return; 179 return;
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 return deniedPermission; 248 return deniedPermission;
259 } 249 }
260 250
261 void Notification::requestPermission(ScriptExecutionContext* context, PassRefPtr <NotificationPermissionCallback> callback) 251 void Notification::requestPermission(ScriptExecutionContext* context, PassRefPtr <NotificationPermissionCallback> callback)
262 { 252 {
263 ASSERT(toDocument(context)->page()); 253 ASSERT(toDocument(context)->page());
264 NotificationController::from(toDocument(context)->page())->client()->request Permission(context, callback); 254 NotificationController::from(toDocument(context)->page())->client()->request Permission(context, callback);
265 } 255 }
266 256
267 } // namespace WebCore 257 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/modules/notifications/Notification.h ('k') | Source/modules/speech/SpeechRecognition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698