| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ | 5 #ifndef CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ |
| 6 #define CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ | 6 #define CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 bool StopWebRTCEventLog(); | 33 bool StopWebRTCEventLog(); |
| 34 | 34 |
| 35 // This function should be used to notify the WebRTCEventLogHost object that a | 35 // This function should be used to notify the WebRTCEventLogHost object that a |
| 36 // PeerConnection was created in the corresponding render process. | 36 // PeerConnection was created in the corresponding render process. |
| 37 void PeerConnectionAdded(int peer_connection_local_id); | 37 void PeerConnectionAdded(int peer_connection_local_id); |
| 38 | 38 |
| 39 // This function should be used to notify the WebRTCEventLogHost object that a | 39 // This function should be used to notify the WebRTCEventLogHost object that a |
| 40 // PeerConnection was removed in the corresponding render process. | 40 // PeerConnection was removed in the corresponding render process. |
| 41 void PeerConnectionRemoved(int peer_connection_local_id); | 41 void PeerConnectionRemoved(int peer_connection_local_id); |
| 42 | 42 |
| 43 base::WeakPtr<WebRTCEventLogHost> GetWeakPtr(); |
| 44 |
| 43 private: | 45 private: |
| 44 // Actually start the eventlog for a single PeerConnection using the path | 46 // Actually start the eventlog for a single PeerConnection using the path |
| 45 // stored in base_file_path_. | 47 // stored in base_file_path_. |
| 46 bool StartEventLogForPeerConnection(int peer_connection_local_id); | 48 bool StartEventLogForPeerConnection(int peer_connection_local_id); |
| 47 | 49 |
| 48 // Send the platform file to the render process using an IPC message. | 50 // Send the platform file to the render process using an IPC message. |
| 49 void SendEventLogFileToRenderer(int peer_connection_local_id, | 51 void SendEventLogFileToRenderer(int peer_connection_local_id, |
| 50 IPC::PlatformFileForTransit file_for_transit); | 52 IPC::PlatformFileForTransit file_for_transit); |
| 51 | 53 |
| 52 // The render process ID that this object is associated with. | 54 // The render process ID that this object is associated with. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 66 bool rtc_event_logging_enabled_; | 68 bool rtc_event_logging_enabled_; |
| 67 | 69 |
| 68 base::WeakPtrFactory<WebRTCEventLogHost> weak_ptr_factory_; | 70 base::WeakPtrFactory<WebRTCEventLogHost> weak_ptr_factory_; |
| 69 | 71 |
| 70 DISALLOW_COPY_AND_ASSIGN(WebRTCEventLogHost); | 72 DISALLOW_COPY_AND_ASSIGN(WebRTCEventLogHost); |
| 71 }; | 73 }; |
| 72 | 74 |
| 73 } // namespace content | 75 } // namespace content |
| 74 | 76 |
| 75 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ | 77 #endif // CONTENT_BROWSER_MEDIA_WEBRTC_WEBRTC_EVENTLOG_HOST_H_ |
| OLD | NEW |