OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "jingle/notifier/listener/push_notifications_listen_task.h" | 5 #include "jingle/notifier/listener/push_notifications_listen_task.h" |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "jingle/notifier/listener/notification_constants.h" | 9 #include "jingle/notifier/listener/notification_constants.h" |
10 #include "jingle/notifier/listener/notification_defines.h" | 10 #include "jingle/notifier/listener/notification_defines.h" |
11 #include "jingle/notifier/listener/xml_element_util.h" | 11 #include "jingle/notifier/listener/xml_element_util.h" |
12 #include "talk/base/task.h" | |
13 #include "talk/xmllite/qname.h" | 12 #include "talk/xmllite/qname.h" |
14 #include "talk/xmllite/xmlelement.h" | 13 #include "talk/xmllite/xmlelement.h" |
| 14 #include "talk/xmpp/constants.h" |
15 #include "talk/xmpp/xmppclient.h" | 15 #include "talk/xmpp/xmppclient.h" |
16 #include "talk/xmpp/constants.h" | |
17 #include "talk/xmpp/xmppengine.h" | 16 #include "talk/xmpp/xmppengine.h" |
| 17 #include "webrtc/base/task.h" |
18 | 18 |
19 namespace notifier { | 19 namespace notifier { |
20 | 20 |
21 PushNotificationsListenTask::Delegate::~Delegate() { | 21 PushNotificationsListenTask::Delegate::~Delegate() { |
22 } | 22 } |
23 | 23 |
24 PushNotificationsListenTask::PushNotificationsListenTask( | 24 PushNotificationsListenTask::PushNotificationsListenTask( |
25 buzz::XmppTaskParentInterface* parent, Delegate* delegate) | 25 buzz::XmppTaskParentInterface* parent, Delegate* delegate) |
26 : buzz::XmppTask(parent, buzz::XmppEngine::HL_TYPE), | 26 : buzz::XmppTask(parent, buzz::XmppEngine::HL_TYPE), |
27 delegate_(delegate) { | 27 delegate_(delegate) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 } | 93 } |
94 | 94 |
95 bool PushNotificationsListenTask::IsValidNotification( | 95 bool PushNotificationsListenTask::IsValidNotification( |
96 const buzz::XmlElement* stanza) { | 96 const buzz::XmlElement* stanza) { |
97 // We don't do much validation here, just check if the stanza is a message | 97 // We don't do much validation here, just check if the stanza is a message |
98 // stanza. | 98 // stanza. |
99 return (stanza->Name() == buzz::QN_MESSAGE); | 99 return (stanza->Name() == buzz::QN_MESSAGE); |
100 } | 100 } |
101 | 101 |
102 } // namespace notifier | 102 } // namespace notifier |
OLD | NEW |