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 COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H | 5 #ifndef COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H |
6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H | 6 #define COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 void HandleRemoteStatusUpdateMessage(const base::DictionaryValue& message); | 78 void HandleRemoteStatusUpdateMessage(const base::DictionaryValue& message); |
79 | 79 |
80 // Handles an incoming "decrypt_response" message, parsing and notifying | 80 // Handles an incoming "decrypt_response" message, parsing and notifying |
81 // observers of the decrypted content. | 81 // observers of the decrypted content. |
82 void HandleDecryptResponseMessage(const base::DictionaryValue& message); | 82 void HandleDecryptResponseMessage(const base::DictionaryValue& message); |
83 | 83 |
84 // Handles an incoming "unlock_response" message, notifying observers of the | 84 // Handles an incoming "unlock_response" message, notifying observers of the |
85 // response. | 85 // response. |
86 void HandleUnlockResponseMessage(const base::DictionaryValue& message); | 86 void HandleUnlockResponseMessage(const base::DictionaryValue& message); |
87 | 87 |
88 // For iOS, we need to poll the phone every few seconds to keep the app alive | |
89 // in the background. This function starts the poll loop. | |
90 void PollScreenStateForIOS(); | |
91 | |
92 // ConnectionObserver: | 88 // ConnectionObserver: |
93 void OnConnectionStatusChanged(Connection* connection, | 89 void OnConnectionStatusChanged(Connection* connection, |
94 Connection::Status old_status, | 90 Connection::Status old_status, |
95 Connection::Status new_status) override; | 91 Connection::Status new_status) override; |
96 void OnMessageReceived(const Connection& connection, | 92 void OnMessageReceived(const Connection& connection, |
97 const WireMessage& wire_message) override; | 93 const WireMessage& wire_message) override; |
98 void OnSendCompleted(const Connection& connection, | 94 void OnSendCompleted(const Connection& connection, |
99 const WireMessage& wire_message, | 95 const WireMessage& wire_message, |
100 bool success) override; | 96 bool success) override; |
101 | 97 |
(...skipping 15 matching lines...) Expand all Loading... |
117 scoped_ptr<PendingMessage> pending_message_; | 113 scoped_ptr<PendingMessage> pending_message_; |
118 | 114 |
119 base::WeakPtrFactory<MessengerImpl> weak_ptr_factory_; | 115 base::WeakPtrFactory<MessengerImpl> weak_ptr_factory_; |
120 | 116 |
121 DISALLOW_COPY_AND_ASSIGN(MessengerImpl); | 117 DISALLOW_COPY_AND_ASSIGN(MessengerImpl); |
122 }; | 118 }; |
123 | 119 |
124 } // namespace proximity_auth | 120 } // namespace proximity_auth |
125 | 121 |
126 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H | 122 #endif // COMPONENTS_PROXIMITY_AUTH_MESSENGER_IMPL_H |
OLD | NEW |