OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 6 #define CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "components/gcm_driver/gcm_client.h" |
13 #include "components/gcm_driver/gcm_driver.h" | 14 #include "components/gcm_driver/gcm_driver.h" |
14 #include "components/gcm_driver/gcm_profile_service.h" | 15 #include "components/gcm_driver/gcm_profile_service.h" |
15 | 16 |
16 class Profile; | 17 class Profile; |
17 | 18 |
18 namespace content { | 19 namespace content { |
19 class BrowserContext; | 20 class BrowserContext; |
20 } // namespace content | 21 } // namespace content |
21 | 22 |
22 namespace gcm { | 23 namespace gcm { |
(...skipping 15 matching lines...) Expand all Loading... |
38 void UnregisterFinished(const std::string& app_id); | 39 void UnregisterFinished(const std::string& app_id); |
39 void SendFinished(const std::string& app_id, | 40 void SendFinished(const std::string& app_id, |
40 const std::string& receiver_id, | 41 const std::string& receiver_id, |
41 const OutgoingMessage& message); | 42 const OutgoingMessage& message); |
42 | 43 |
43 void AddExpectedUnregisterResponse(GCMClient::Result result); | 44 void AddExpectedUnregisterResponse(GCMClient::Result result); |
44 | 45 |
45 void SetUnregisterCallback(const UnregisterCallback& callback); | 46 void SetUnregisterCallback(const UnregisterCallback& callback); |
46 | 47 |
47 void DispatchMessage(const std::string& app_id, | 48 void DispatchMessage(const std::string& app_id, |
48 const IncomingMessage& message); | 49 const IncomingMessage& message, |
| 50 const GCMClient::MessageReceiptCallback& callback); |
49 | 51 |
50 const OutgoingMessage& last_sent_message() const { | 52 const OutgoingMessage& last_sent_message() const { |
51 return last_sent_message_; | 53 return last_sent_message_; |
52 } | 54 } |
53 | 55 |
54 const std::string& last_receiver_id() const { | 56 const std::string& last_receiver_id() const { |
55 return last_receiver_id_; | 57 return last_receiver_id_; |
56 } | 58 } |
57 | 59 |
58 const std::string& last_registered_app_id() const { | 60 const std::string& last_registered_app_id() const { |
(...skipping 21 matching lines...) Expand all Loading... |
80 OutgoingMessage last_sent_message_; | 82 OutgoingMessage last_sent_message_; |
81 std::string last_receiver_id_; | 83 std::string last_receiver_id_; |
82 UnregisterCallback unregister_callback_; | 84 UnregisterCallback unregister_callback_; |
83 | 85 |
84 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); | 86 DISALLOW_COPY_AND_ASSIGN(FakeGCMProfileService); |
85 }; | 87 }; |
86 | 88 |
87 } // namespace gcm | 89 } // namespace gcm |
88 | 90 |
89 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ | 91 #endif // CHROME_BROWSER_SERVICES_GCM_FAKE_GCM_PROFILE_SERVICE_H_ |
OLD | NEW |