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

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

Issue 24469004: Amusingly deprecate the generic version of 'ExceptionState::throwDOMException'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * Copyright (C) 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 class VoidCallback; 53 class VoidCallback;
54 54
55 class NotificationCenter : public RefCounted<NotificationCenter>, public ScriptW rappable, public ActiveDOMObject { 55 class NotificationCenter : public RefCounted<NotificationCenter>, public ScriptW rappable, public ActiveDOMObject {
56 public: 56 public:
57 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext*, Notifi cationClient*); 57 static PassRefPtr<NotificationCenter> create(ScriptExecutionContext*, Notifi cationClient*);
58 58
59 #if ENABLE(LEGACY_NOTIFICATIONS) 59 #if ENABLE(LEGACY_NOTIFICATIONS)
60 PassRefPtr<Notification> createNotification(const String& iconURI, const Str ing& title, const String& body, ExceptionState& es) 60 PassRefPtr<Notification> createNotification(const String& iconURI, const Str ing& title, const String& body, ExceptionState& es)
61 { 61 {
62 if (!client()) { 62 if (!client()) {
63 es.throwDOMException(InvalidStateError); 63 es.throwUninformativeAndGenericDOMException(InvalidStateError);
64 return 0; 64 return 0;
65 } 65 }
66 return Notification::create(title, body, iconURI, scriptExecutionContext (), es, this); 66 return Notification::create(title, body, iconURI, scriptExecutionContext (), es, this);
67 } 67 }
68 #endif 68 #endif
69 69
70 NotificationClient* client() const { return m_client; } 70 NotificationClient* client() const { return m_client; }
71 71
72 #if ENABLE(LEGACY_NOTIFICATIONS) 72 #if ENABLE(LEGACY_NOTIFICATIONS)
73 int checkPermission(); 73 int checkPermission();
(...skipping 22 matching lines...) Expand all
96 96
97 NotificationClient* m_client; 97 NotificationClient* m_client;
98 HashSet<RefPtr<NotificationRequestCallback> > m_callbacks; 98 HashSet<RefPtr<NotificationRequestCallback> > m_callbacks;
99 }; 99 };
100 100
101 } // namespace WebCore 101 } // namespace WebCore
102 102
103 #endif // ENABLE(LEGACY_NOTIFICATIONS) 103 #endif // ENABLE(LEGACY_NOTIFICATIONS)
104 104
105 #endif // NotificationCenter_h 105 #endif // NotificationCenter_h
OLDNEW
« no previous file with comments | « Source/modules/navigatorcontentutils/NavigatorContentUtils.cpp ('k') | Source/modules/webaudio/AnalyserNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698