OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ | 5 #ifndef CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ |
6 #define CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ | 6 #define CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "content/public/browser/browser_message_filter.h" | 10 #include "content/public/browser/browser_message_filter.h" |
11 #include "url/gurl.h" | 11 #include "url/gurl.h" |
12 | 12 |
13 namespace content { | 13 namespace content { |
14 | 14 |
15 class PushMessagingMessageFilter : public BrowserMessageFilter { | 15 class PushMessagingMessageFilter : public BrowserMessageFilter { |
16 public: | 16 public: |
17 PushMessagingMessageFilter(); | 17 PushMessagingMessageFilter(); |
18 | 18 |
19 private: | 19 private: |
20 virtual ~PushMessagingMessageFilter(); | 20 virtual ~PushMessagingMessageFilter(); |
21 | 21 |
22 // BrowserMessageFilter implementation. | 22 // BrowserMessageFilter implementation. |
23 virtual bool OnMessageReceived(const IPC::Message& message, | 23 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
24 bool* message_was_ok) OVERRIDE; | |
25 | 24 |
26 void OnRegister(int routing_id, | 25 void OnRegister(int routing_id, |
27 int callbacks_id, | 26 int callbacks_id, |
28 const std::string& sender_id); | 27 const std::string& sender_id); |
29 | 28 |
30 void DidRegister(int routing_id, | 29 void DidRegister(int routing_id, |
31 int callbacks_id, | 30 int callbacks_id, |
32 const GURL& endpoint, | 31 const GURL& endpoint, |
33 const std::string& registration_id, | 32 const std::string& registration_id, |
34 bool error); | 33 bool error); |
35 | 34 |
36 DISALLOW_COPY_AND_ASSIGN(PushMessagingMessageFilter); | 35 DISALLOW_COPY_AND_ASSIGN(PushMessagingMessageFilter); |
37 }; | 36 }; |
38 | 37 |
39 } // namespace content | 38 } // namespace content |
40 | 39 |
41 #endif // CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ | 40 #endif // CONTENT_BROWSER_PUSH_MESSAGING_MESSAGE_FILTER_H_ |
OLD | NEW |