| OLD | NEW |
| (Empty) |
| 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. | |
| 4 | |
| 5 #ifndef COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_UI_DELEGATE_H_ | |
| 6 #define COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_UI_DELEGATE_H_ | |
| 7 | |
| 8 #include "base/memory/scoped_ptr.h" | |
| 9 #include "components/proximity_auth/cryptauth/proto/cryptauth_api.pb.h" | |
| 10 | |
| 11 class PrefService; | |
| 12 | |
| 13 namespace gcm { | |
| 14 class GCMDriver; | |
| 15 } | |
| 16 | |
| 17 namespace proximity_auth { | |
| 18 | |
| 19 class CryptAuthClientFactory; | |
| 20 class SecureMessageDelegate; | |
| 21 | |
| 22 // A delegate used by the chrome://proximity-auth WebUI, used to get | |
| 23 // implmentations with dependencies on chrome. | |
| 24 class ProximityAuthUIDelegate { | |
| 25 public: | |
| 26 virtual ~ProximityAuthUIDelegate() {} | |
| 27 | |
| 28 // Returns the PrefService used by the profile. | |
| 29 virtual PrefService* GetPrefService() = 0; | |
| 30 | |
| 31 // Returns the SecureMessageDelegate used by the system. | |
| 32 virtual scoped_ptr<SecureMessageDelegate> CreateSecureMessageDelegate() = 0; | |
| 33 | |
| 34 // Constructs the CryptAuthClientFactory that can be used for API requests. | |
| 35 virtual scoped_ptr<CryptAuthClientFactory> CreateCryptAuthClientFactory() = 0; | |
| 36 | |
| 37 // Constructs the DeviceClassifier message that is sent to CryptAuth for all | |
| 38 // API requests. | |
| 39 virtual cryptauth::DeviceClassifier GetDeviceClassifier() = 0; | |
| 40 | |
| 41 // Returns the account id of the user. | |
| 42 virtual std::string GetAccountId() = 0; | |
| 43 | |
| 44 // Returns the GCMDriver instance used by Chrome. | |
| 45 virtual gcm::GCMDriver* GetGCMDriver() = 0; | |
| 46 }; | |
| 47 | |
| 48 } // namespace proximity_auth | |
| 49 | |
| 50 #endif // COMPONENTS_PROXIMITY_AUTH_WEBUI_PROXIMITY_AUTH_UI_DELEGATE_H_ | |
| OLD | NEW |