Don't preload rarely seen large images
[chromium-blink-merge.git] / components / proximity_auth / client_observer.h
blob1c59ab0dc45b0bf3ec9db3b5f2f9768215669c43
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.
5 #ifndef COMPONENTS_PROXIMITY_AUTH_CLIENT_OBSERVER_H
6 #define COMPONENTS_PROXIMITY_AUTH_CLIENT_OBSERVER_H
8 #include <string>
10 #include "base/memory/scoped_ptr.h"
12 namespace proximity_auth {
14 struct RemoteStatusUpdate;
16 // An interface for observing events that happen on a Client.
17 class ClientObserver {
18 public:
19 // Called when sending an "Easy Unlock used" local event message completes.
20 // |success| is true iff the event was sent successfully.
21 virtual void OnUnlockEventSent(bool success) = 0;
23 // Called when a RemoteStatusUpdate is received.
24 virtual void OnRemoteStatusUpdate(
25 const RemoteStatusUpdate& status_update) = 0;
27 // Called when a response to a 'decrypt_request' is received, with the
28 // |decrypted_bytes| that were returned by the remote device. A null pointer
29 // indicates failure.
30 virtual void OnDecryptResponse(scoped_ptr<std::string> decrypted_bytes) = 0;
32 // Called when a response to a 'unlock_request' is received.
33 // |success| is true iff the request was made successfully.
34 virtual void OnUnlockResponse(bool success) = 0;
36 // Called when the underlying secure channel disconnects.
37 virtual void OnDisconnected() = 0;
40 } // namespace proximity_auth
42 #endif // COMPONENTS_PROXIMITY_AUTH_CLIENT_OBSERVER_H