| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ | 5 #ifndef REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ |
| 6 #define REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ | 6 #define REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_BASE_H_ |
| 7 | 7 |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "remoting/protocol/authenticator.h" | 9 #include "remoting/protocol/authenticator.h" |
| 10 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" | 10 #include "third_party/webrtc/libjingle/xmllite/xmlelement.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 // the V2Authenticator is used instead of this class. Only the method name | 35 // the V2Authenticator is used instead of this class. Only the method name |
| 36 // differs, which the client uses to determine that pairing should be offered | 36 // differs, which the client uses to determine that pairing should be offered |
| 37 // to the user (see NegotiatingHostAuthenticator::CreateAuthenticator and | 37 // to the user (see NegotiatingHostAuthenticator::CreateAuthenticator and |
| 38 // NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod). | 38 // NegotiatingClientAuthenticator::CreateAuthenticatorForCurrentMethod). |
| 39 class PairingAuthenticatorBase : public Authenticator { | 39 class PairingAuthenticatorBase : public Authenticator { |
| 40 public: | 40 public: |
| 41 PairingAuthenticatorBase(); | 41 PairingAuthenticatorBase(); |
| 42 virtual ~PairingAuthenticatorBase(); | 42 virtual ~PairingAuthenticatorBase(); |
| 43 | 43 |
| 44 // Authenticator interface. | 44 // Authenticator interface. |
| 45 virtual State state() const OVERRIDE; | 45 virtual State state() const override; |
| 46 virtual bool started() const OVERRIDE; | 46 virtual bool started() const override; |
| 47 virtual RejectionReason rejection_reason() const OVERRIDE; | 47 virtual RejectionReason rejection_reason() const override; |
| 48 virtual void ProcessMessage(const buzz::XmlElement* message, | 48 virtual void ProcessMessage(const buzz::XmlElement* message, |
| 49 const base::Closure& resume_callback) OVERRIDE; | 49 const base::Closure& resume_callback) override; |
| 50 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; | 50 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() override; |
| 51 virtual scoped_ptr<ChannelAuthenticator> | 51 virtual scoped_ptr<ChannelAuthenticator> |
| 52 CreateChannelAuthenticator() const OVERRIDE; | 52 CreateChannelAuthenticator() const override; |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 typedef base::Callback<void(scoped_ptr<Authenticator> authenticator)> | 55 typedef base::Callback<void(scoped_ptr<Authenticator> authenticator)> |
| 56 SetAuthenticatorCallback; | 56 SetAuthenticatorCallback; |
| 57 | 57 |
| 58 static const buzz::StaticQName kPairingInfoTag; | 58 static const buzz::StaticQName kPairingInfoTag; |
| 59 static const buzz::StaticQName kClientIdAttribute; | 59 static const buzz::StaticQName kClientIdAttribute; |
| 60 | 60 |
| 61 // Create a V2 authenticator in the specified state, prompting the user for | 61 // Create a V2 authenticator in the specified state, prompting the user for |
| 62 // the PIN first if necessary. | 62 // the PIN first if necessary. |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_; | 99 base::WeakPtrFactory<PairingAuthenticatorBase> weak_factory_; |
| 100 | 100 |
| 101 DISALLOW_COPY_AND_ASSIGN(PairingAuthenticatorBase); | 101 DISALLOW_COPY_AND_ASSIGN(PairingAuthenticatorBase); |
| 102 }; | 102 }; |
| 103 | 103 |
| 104 } // namespace protocol | 104 } // namespace protocol |
| 105 } // namespace remoting | 105 } // namespace remoting |
| 106 | 106 |
| 107 #endif // REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_H_ | 107 #endif // REMOTING_PROTOCOL_PAIRING_AUTHENTICATOR_H_ |
| OLD | NEW |