| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION
_H_ | 5 #ifndef EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION
_H_ |
| 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION
_H_ | 6 #define EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESSION
_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 const DisplaySourceSessionParams& params); | 33 const DisplaySourceSessionParams& params); |
| 34 ~WiFiDisplaySession() override; | 34 ~WiFiDisplaySession() override; |
| 35 | 35 |
| 36 private: | 36 private: |
| 37 using DisplaySourceSession::CompletionCallback; | 37 using DisplaySourceSession::CompletionCallback; |
| 38 // DisplaySourceSession overrides. | 38 // DisplaySourceSession overrides. |
| 39 void Start(const CompletionCallback& callback) override; | 39 void Start(const CompletionCallback& callback) override; |
| 40 void Terminate(const CompletionCallback& callback) override; | 40 void Terminate(const CompletionCallback& callback) override; |
| 41 | 41 |
| 42 // WiFiDisplaySessionServiceClient overrides. | 42 // WiFiDisplaySessionServiceClient overrides. |
| 43 void OnConnected(const mojo::String& ip_address) override; | 43 void OnConnected(const mojo::String& local_ip_address, |
| 44 const mojo::String& sink_ip_address) override; |
| 44 void OnConnectRequestHandled(bool success, | 45 void OnConnectRequestHandled(bool success, |
| 45 const mojo::String& error) override; | 46 const mojo::String& error) override; |
| 46 void OnTerminated() override; | 47 void OnTerminated() override; |
| 47 void OnDisconnectRequestHandled(bool success, | 48 void OnDisconnectRequestHandled(bool success, |
| 48 const mojo::String& error) override; | 49 const mojo::String& error) override; |
| 49 void OnError(int32_t type, const mojo::String& description) override; | 50 void OnError(int32_t type, const mojo::String& description) override; |
| 50 void OnMessage(const mojo::String& data) override; | 51 void OnMessage(const mojo::String& data) override; |
| 51 | 52 |
| 52 // wds::Peer::Delegate overrides. | 53 // wds::Peer::Delegate overrides. |
| 53 unsigned CreateTimer(int seconds) override; | 54 unsigned CreateTimer(int seconds) override; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 69 void Terminate(); | 70 void Terminate(); |
| 70 | 71 |
| 71 void RunStartCallback(bool success, const std::string& error = ""); | 72 void RunStartCallback(bool success, const std::string& error = ""); |
| 72 void RunTerminateCallback(bool success, const std::string& error = ""); | 73 void RunTerminateCallback(bool success, const std::string& error = ""); |
| 73 | 74 |
| 74 private: | 75 private: |
| 75 scoped_ptr<wds::Source> wfd_source_; | 76 scoped_ptr<wds::Source> wfd_source_; |
| 76 scoped_ptr<WiFiDisplayMediaManager> media_manager_; | 77 scoped_ptr<WiFiDisplayMediaManager> media_manager_; |
| 77 WiFiDisplaySessionServicePtr service_; | 78 WiFiDisplaySessionServicePtr service_; |
| 78 mojo::Binding<WiFiDisplaySessionServiceClient> binding_; | 79 mojo::Binding<WiFiDisplaySessionServiceClient> binding_; |
| 79 std::string ip_address_; | 80 std::string local_ip_address_; |
| 80 std::map<int, scoped_ptr<base::Timer>> timers_; | 81 std::map<int, scoped_ptr<base::Timer>> timers_; |
| 81 | 82 |
| 82 DisplaySourceSessionParams params_; | 83 DisplaySourceSessionParams params_; |
| 83 CompletionCallback start_completion_callback_; | 84 CompletionCallback start_completion_callback_; |
| 84 CompletionCallback teminate_completion_callback_; | 85 CompletionCallback teminate_completion_callback_; |
| 85 // Holds sequence number for the following RTSP request-response pair. | 86 // Holds sequence number for the following RTSP request-response pair. |
| 86 mutable int cseq_; | 87 mutable int cseq_; |
| 87 int timer_id_; | 88 int timer_id_; |
| 88 base::WeakPtrFactory<WiFiDisplaySession> weak_factory_; | 89 base::WeakPtrFactory<WiFiDisplaySession> weak_factory_; |
| 89 | 90 |
| 90 DISALLOW_COPY_AND_ASSIGN(WiFiDisplaySession); | 91 DISALLOW_COPY_AND_ASSIGN(WiFiDisplaySession); |
| 91 }; | 92 }; |
| 92 | 93 |
| 93 } // namespace extensions | 94 } // namespace extensions |
| 94 | 95 |
| 95 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESS
ION_H_ | 96 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESS
ION_H_ |
| OLD | NEW |