roll libyuv to r1464 for yuva support
[chromium-blink-merge.git] / components / proximity_auth / proximity_auth_client.h
blobb5d2c7b834dd46da64912b7c7779cc860d7ac796
1 // Copyright 2015 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_H_
6 #define COMPONENTS_PROXIMITY_AUTH_CLIENT_H_
8 #include <string>
10 #include "components/proximity_auth/screenlock_state.h"
12 namespace proximity_auth {
14 // An interface that needs to be supplied to the Proximity Auth component by its
15 // embedder. There should be one |ProximityAuthClient| per
16 // |content::BrowserContext|.
17 class ProximityAuthClient {
18 public:
19 virtual ~ProximityAuthClient() {}
21 // Returns the authenticated username.
22 virtual std::string GetAuthenticatedUsername() const = 0;
24 // Updates the user pod on the signin or lock screen to reflect the provided
25 // screenlock state.
26 virtual void UpdateScreenlockState(ScreenlockState state) = 0;
28 // Finalizes an unlock attempt initiated by the user. If |success| is true,
29 // the screen is unlocked; otherwise, the auth attempt is rejected. An auth
30 // attempt must be in progress before calling this function.
31 virtual void FinalizeUnlock(bool success) = 0;
33 // Finalizes a sign-in attempt initiated by the user. If |success| is true,
34 // the user is signed in; otherwise, the auth attempt is rejected. An auth
35 // attempt must be in progress before calling this function.
36 virtual void FinalizeSignin(const std::string& secret) = 0;
39 } // namespace proximity_auth
41 #endif // COMPONENTS_PROXIMITY_AUTH_CLIENT_H_