| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ | 5 #ifndef COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ |
| 6 #define COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ | 6 #define COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 class SharkConnectionListener : public HostPairingController::Observer { | 24 class SharkConnectionListener : public HostPairingController::Observer { |
| 25 public: | 25 public: |
| 26 typedef base::Callback<void(scoped_ptr<HostPairingController>)> | 26 typedef base::Callback<void(scoped_ptr<HostPairingController>)> |
| 27 OnConnectedCallback; | 27 OnConnectedCallback; |
| 28 | 28 |
| 29 SharkConnectionListener( | 29 SharkConnectionListener( |
| 30 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner, | 30 const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner, |
| 31 OnConnectedCallback callback); | 31 OnConnectedCallback callback); |
| 32 ~SharkConnectionListener() override; | 32 ~SharkConnectionListener() override; |
| 33 | 33 |
| 34 void ResetHostPairingController(); |
| 35 |
| 34 private: | 36 private: |
| 35 typedef HostPairingController::Stage Stage; | 37 typedef HostPairingController::Stage Stage; |
| 36 | 38 |
| 37 // HostPairingController::Observer overrides: | 39 // HostPairingController::Observer overrides: |
| 38 void PairingStageChanged(Stage new_stage) override; | 40 void PairingStageChanged(Stage new_stage) override; |
| 39 | 41 |
| 40 OnConnectedCallback callback_; | 42 OnConnectedCallback callback_; |
| 41 scoped_ptr<HostPairingController> controller_; | 43 scoped_ptr<HostPairingController> controller_; |
| 42 | 44 |
| 43 DISALLOW_COPY_AND_ASSIGN(SharkConnectionListener); | 45 DISALLOW_COPY_AND_ASSIGN(SharkConnectionListener); |
| 44 }; | 46 }; |
| 45 | 47 |
| 46 } // namespace pairing_chromeos | 48 } // namespace pairing_chromeos |
| 47 | 49 |
| 48 #endif // COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ | 50 #endif // COMPONENTS_PAIRING_SHARK_CONNECTION_LISTENER_H_ |
| OLD | NEW |