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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 std::string GetLocalIPAddress() const override; | 56 std::string GetLocalIPAddress() const override; |
57 int GetNextCSeq(int* initial_peer_cseq = nullptr) const override; | 57 int GetNextCSeq(int* initial_peer_cseq = nullptr) const override; |
58 | 58 |
59 // wds::Peer::Observer overrides. | 59 // wds::Peer::Observer overrides. |
60 void ErrorOccurred(wds::ErrorType error) override; | 60 void ErrorOccurred(wds::ErrorType error) override; |
61 void SessionCompleted() override; | 61 void SessionCompleted() override; |
62 | 62 |
63 // A connection error handler for the mojo objects used in this class. | 63 // A connection error handler for the mojo objects used in this class. |
64 void OnIPCConnectionError(); | 64 void OnIPCConnectionError(); |
65 | 65 |
| 66 // An error handler for media pipeline error. |
| 67 void OnMediaError(const std::string& error); |
| 68 |
| 69 void Terminate(); |
| 70 |
66 void RunStartCallback(bool success, const std::string& error = ""); | 71 void RunStartCallback(bool success, const std::string& error = ""); |
67 void RunTerminateCallback(bool success, const std::string& error = ""); | 72 void RunTerminateCallback(bool success, const std::string& error = ""); |
68 | 73 |
69 private: | 74 private: |
70 scoped_ptr<wds::Source> wfd_source_; | 75 scoped_ptr<wds::Source> wfd_source_; |
71 scoped_ptr<WiFiDisplayMediaManager> media_manager_; | 76 scoped_ptr<WiFiDisplayMediaManager> media_manager_; |
72 WiFiDisplaySessionServicePtr service_; | 77 WiFiDisplaySessionServicePtr service_; |
73 mojo::Binding<WiFiDisplaySessionServiceClient> binding_; | 78 mojo::Binding<WiFiDisplaySessionServiceClient> binding_; |
74 std::string ip_address_; | 79 std::string ip_address_; |
75 std::map<int, scoped_ptr<base::Timer>> timers_; | 80 std::map<int, scoped_ptr<base::Timer>> timers_; |
76 | 81 |
77 DisplaySourceSessionParams params_; | 82 DisplaySourceSessionParams params_; |
78 CompletionCallback start_completion_callback_; | 83 CompletionCallback start_completion_callback_; |
79 CompletionCallback teminate_completion_callback_; | 84 CompletionCallback teminate_completion_callback_; |
80 // Holds sequence number for the following RTSP request-response pair. | 85 // Holds sequence number for the following RTSP request-response pair. |
81 mutable int cseq_; | 86 mutable int cseq_; |
82 int timer_id_; | 87 int timer_id_; |
83 base::WeakPtrFactory<WiFiDisplaySession> weak_factory_; | 88 base::WeakPtrFactory<WiFiDisplaySession> weak_factory_; |
84 | 89 |
85 DISALLOW_COPY_AND_ASSIGN(WiFiDisplaySession); | 90 DISALLOW_COPY_AND_ASSIGN(WiFiDisplaySession); |
86 }; | 91 }; |
87 | 92 |
88 } // namespace extensions | 93 } // namespace extensions |
89 | 94 |
90 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESS
ION_H_ | 95 #endif // EXTENSIONS_RENDERER_API_DISPLAY_SOURCE_WIFI_DISPLAY_WIFI_DISPLAY_SESS
ION_H_ |
OLD | NEW |