OLD | NEW |
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 18 matching lines...) Expand all Loading... |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "public/web/WebNotification.h" | 32 #include "public/web/WebNotification.h" |
33 | 33 |
34 #include "core/events/Event.h" | 34 #include "core/events/Event.h" |
35 #include "modules/notifications/Notification.h" | 35 #include "modules/notifications/Notification.h" |
36 #include "public/platform/WebURL.h" | 36 #include "public/platform/WebURL.h" |
37 #include "wtf/PassRefPtr.h" | 37 #include "wtf/PassRefPtr.h" |
38 | 38 |
39 using blink::Notification; | |
40 | |
41 namespace blink { | 39 namespace blink { |
42 | 40 |
43 void WebNotification::reset() | 41 void WebNotification::reset() |
44 { | 42 { |
45 m_private.reset(); | 43 m_private.reset(); |
46 } | 44 } |
47 | 45 |
48 void WebNotification::assign(const WebNotification& other) | 46 void WebNotification::assign(const WebNotification& other) |
49 { | 47 { |
50 m_private = other.m_private; | 48 m_private = other.m_private; |
51 } | 49 } |
52 | 50 |
53 bool WebNotification::equals(const WebNotification& other) const | 51 bool WebNotification::equals(const WebNotification& other) const |
54 { | 52 { |
55 return m_private.get() == other.m_private.get(); | 53 return m_private.get() == other.m_private.get(); |
56 } | 54 } |
57 | 55 |
58 bool WebNotification::lessThan(const WebNotification& other) const | 56 bool WebNotification::lessThan(const WebNotification& other) const |
59 { | 57 { |
60 return m_private.get() < other.m_private.get(); | 58 return m_private.get() < other.m_private.get(); |
61 } | 59 } |
62 | 60 |
63 WebString WebNotification::title() const | 61 WebString WebNotification::title() const |
64 { | 62 { |
65 return m_private->title(); | 63 return m_private->title(); |
66 } | 64 } |
67 | 65 |
68 WebTextDirection WebNotification::direction() const | 66 WebTextDirection WebNotification::direction() const |
69 { | 67 { |
70 return (m_private->direction() == blink::RTL) ? | 68 return (m_private->direction() == RTL) ? |
71 WebTextDirectionRightToLeft : | 69 WebTextDirectionRightToLeft : |
72 WebTextDirectionLeftToRight; | 70 WebTextDirectionLeftToRight; |
73 } | 71 } |
74 | 72 |
75 WebString WebNotification::lang() const | 73 WebString WebNotification::lang() const |
76 { | 74 { |
77 return m_private->lang(); | 75 return m_private->lang(); |
78 } | 76 } |
79 | 77 |
80 WebString WebNotification::body() const | 78 WebString WebNotification::body() const |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 { | 117 { |
120 } | 118 } |
121 | 119 |
122 WebNotification& WebNotification::operator=(Notification* notification) | 120 WebNotification& WebNotification::operator=(Notification* notification) |
123 { | 121 { |
124 m_private = notification; | 122 m_private = notification; |
125 return *this; | 123 return *this; |
126 } | 124 } |
127 | 125 |
128 } // namespace blink | 126 } // namespace blink |
OLD | NEW |