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

Side by Side Diff: webkit/api/public/WebNotification.h

Issue 194079: renderer process notifications support (Closed)
Patch Set: last change for code review Created 11 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
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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 WebNotification() : m_private(0) { } 49 WebNotification() : m_private(0) { }
50 WebNotification(const WebNotification& other) : m_private(0) { assign(other); } 50 WebNotification(const WebNotification& other) : m_private(0) { assign(other); }
51 51
52 ~WebNotification() { reset(); } 52 ~WebNotification() { reset(); }
53 53
54 WEBKIT_API void reset(); 54 WEBKIT_API void reset();
55 WEBKIT_API void assign(const WebNotification&); 55 WEBKIT_API void assign(const WebNotification&);
56 56
57 WebNotification& operator=(const WebNotification& other) { assign(other); return *this; } 57 WebNotification& operator=(const WebNotification& other) { assign(other); return *this; }
58 58
59 // Operators required to put WebNotification in an ordered map.
59 bool equals(const WebNotification& other) const { return m_private == other.m_private; } 60 bool equals(const WebNotification& other) const { return m_private == other.m_private; }
61 bool lessThan(const WebNotification& other) const;
60 62
61 // Is the notification HTML vs. icon-title-text? 63 // Is the notification HTML vs. icon-title-text?
62 WEBKIT_API bool isHTML() const; 64 WEBKIT_API bool isHTML() const;
63 65
64 // If HTML, the URL which contains the contents of the notification. 66 // If HTML, the URL which contains the contents of the notification.
65 WEBKIT_API WebURL url() const; 67 WEBKIT_API WebURL url() const;
66 68
67 // If not HTML, the parameters for the icon-title-text notification. 69 // If not HTML, the parameters for the icon-title-text notification.
68 WEBKIT_API WebString icon() const; 70 WEBKIT_API WebString icon() const;
69 WEBKIT_API WebString title() const; 71 WEBKIT_API WebString title() const;
(...skipping 24 matching lines...) Expand all
94 inline bool operator==(const WebNotification& a, const WebNotification& b) 96 inline bool operator==(const WebNotification& a, const WebNotification& b)
95 { 97 {
96 return a.equals(b); 98 return a.equals(b);
97 } 99 }
98 100
99 inline bool operator!=(const WebNotification& a, const WebNotification& b) 101 inline bool operator!=(const WebNotification& a, const WebNotification& b)
100 { 102 {
101 return !a.equals(b); 103 return !a.equals(b);
102 } 104 }
103 105
106 inline bool operator<(const WebNotification& a, const WebNotification& b)
107 {
108 return a.lessThan(b);
109 }
110
104 } // namespace WebKit 111 } // namespace WebKit
105 112
106 #endif 113 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698