Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(434)

Side by Side Diff: components/proximity_auth/connection_observer.h

Issue 538843002: [EasyUnlock] Port Connection class to native code. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef COMPONENTS_PROXIMITY_AUTH_CONNECTION_OBSERVER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CONNECTION_OBSERVER_H
7
8 #include "components/proximity_auth/connection.h"
9
10 namespace proximity_auth {
11
12 class PermitMessage;
13
14 // An interface for observing events that happen on a Connection.
15 class ConnectionObserver {
16 public:
17 // Called when the |connection|'s status changes from |old_status| to
18 // |new_status|.
19 virtual void OnConnectionStatusChanged(const Connection& connection,
20 Connection::Status old_status,
21 Connection::Status new_status) = 0;
22
23 // Called when a |message| is received from a remote device over the
24 // |connection|.
25 virtual void OnMessageReceived(const Connection& connection,
26 const PermitMessage& message) = 0;
Tim Song 2014/09/05 00:30:34 Mention that |message| shouldn't be kept around (e
Ilya Sherman 2014/09/05 01:02:11 I'm not sure what the concern is. It's pretty muc
Tim Song 2014/09/05 03:10:33 It's easy to make such a mistake with Bind, since
27
28 // Called after a |message| is sent to the remote device over the
29 // |connection|. |success| is |true| iff the message is sent successfully.
30 virtual void OnSendCompleted(const Connection& connection,
31 const PermitMessage& message,
32 bool success) = 0;
33 };
34
35 } // namespace proximity_auth
36
37 #endif // COMPONENTS_PROXIMITY_AUTH_CONNECTION_OBSERVER_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698