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

Side by Side Diff: Source/WebKit/chromium/public/WebNotification.h

Issue 7148005: Merge 88738 - [Chromium] WebNotification should check if ScriptExecutionContext is gone (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 6 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
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebNotification.cpp » ('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 * 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 21 matching lines...) Expand all
32 #define WebNotification_h 32 #define WebNotification_h
33 33
34 #include "WebCommon.h" 34 #include "WebCommon.h"
35 #include "WebTextDirection.h" 35 #include "WebTextDirection.h"
36 36
37 #if WEBKIT_IMPLEMENTATION 37 #if WEBKIT_IMPLEMENTATION
38 namespace WebCore { class Notification; } 38 namespace WebCore { class Notification; }
39 namespace WTF { template <typename T> class PassRefPtr; } 39 namespace WTF { template <typename T> class PassRefPtr; }
40 #endif 40 #endif
41 41
42 namespace WTF {
43 class AtomicString;
44 }
45
42 namespace WebKit { 46 namespace WebKit {
43 47
44 class WebNotificationPrivate; 48 class WebNotificationPrivate;
45 class WebURL; 49 class WebURL;
46 class WebString; 50 class WebString;
47 51
48 // Represents access to a desktop notification. 52 // Represents access to a desktop notification.
49 class WebNotification { 53 class WebNotification {
50 public: 54 public:
51 WebNotification() : m_private(0) { } 55 WebNotification() : m_private(0) { }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 WEBKIT_API void dispatchClickEvent(); 101 WEBKIT_API void dispatchClickEvent();
98 102
99 #if WEBKIT_IMPLEMENTATION 103 #if WEBKIT_IMPLEMENTATION
100 WebNotification(const WTF::PassRefPtr<WebCore::Notification>&); 104 WebNotification(const WTF::PassRefPtr<WebCore::Notification>&);
101 WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&); 105 WebNotification& operator=(const WTF::PassRefPtr<WebCore::Notification>&);
102 operator WTF::PassRefPtr<WebCore::Notification>() const; 106 operator WTF::PassRefPtr<WebCore::Notification>() const;
103 #endif 107 #endif
104 108
105 private: 109 private:
106 void assign(WebNotificationPrivate*); 110 void assign(WebNotificationPrivate*);
111 void dispatchEvent(const WTF::AtomicString& type);
107 WebNotificationPrivate* m_private; 112 WebNotificationPrivate* m_private;
108 }; 113 };
109 114
110 inline bool operator==(const WebNotification& a, const WebNotification& b) 115 inline bool operator==(const WebNotification& a, const WebNotification& b)
111 { 116 {
112 return a.equals(b); 117 return a.equals(b);
113 } 118 }
114 119
115 inline bool operator!=(const WebNotification& a, const WebNotification& b) 120 inline bool operator!=(const WebNotification& a, const WebNotification& b)
116 { 121 {
117 return !a.equals(b); 122 return !a.equals(b);
118 } 123 }
119 124
120 inline bool operator<(const WebNotification& a, const WebNotification& b) 125 inline bool operator<(const WebNotification& a, const WebNotification& b)
121 { 126 {
122 return a.lessThan(b); 127 return a.lessThan(b);
123 } 128 }
124 129
125 } // namespace WebKit 130 } // namespace WebKit
126 131
127 #endif 132 #endif
OLDNEW
« no previous file with comments | « no previous file | Source/WebKit/chromium/src/WebNotification.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698