| 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 CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ | 5 #ifndef CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ |
| 6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ | 6 #define CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "chrome/browser/media/rtp_dump_type.h" | 10 #include "chrome/browser/media/rtp_dump_type.h" |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 stop_callback); | 85 stop_callback); |
| 86 | 86 |
| 87 // Stops dumping the RTP headers for the specified direction. Must be called | 87 // Stops dumping the RTP headers for the specified direction. Must be called |
| 88 // on the IO thread. |type| specifies which direction(s) of RTP packet dumping | 88 // on the IO thread. |type| specifies which direction(s) of RTP packet dumping |
| 89 // should be stopped. |callback| will be called when stopping the dump is | 89 // should be stopped. |callback| will be called when stopping the dump is |
| 90 // done. | 90 // done. |
| 91 void StopRtpDump(RtpDumpType type, const GenericDoneCallback& callback); | 91 void StopRtpDump(RtpDumpType type, const GenericDoneCallback& callback); |
| 92 | 92 |
| 93 // Called when an RTP packet is sent or received. Must be called on the UI | 93 // Called when an RTP packet is sent or received. Must be called on the UI |
| 94 // thread. | 94 // thread. |
| 95 void OnRtpPacket(const uint8* packet_header, | 95 void OnRtpPacket(scoped_ptr<uint8[]> packet_header, |
| 96 size_t header_length, | 96 size_t header_length, |
| 97 size_t packet_length, | 97 size_t packet_length, |
| 98 bool incoming); | 98 bool incoming); |
| 99 | 99 |
| 100 private: | 100 private: |
| 101 // States used for protecting from function calls made at non-allowed points | 101 // States used for protecting from function calls made at non-allowed points |
| 102 // in time. For example, StartLogging() is only allowed in CLOSED state. | 102 // in time. For example, StartLogging() is only allowed in CLOSED state. |
| 103 // Transitions: SetMetaData(): CLOSED -> CLOSED. | 103 // Transitions: SetMetaData(): CLOSED -> CLOSED. |
| 104 // StartLogging(): CLOSED -> STARTING. | 104 // StartLogging(): CLOSED -> STARTING. |
| 105 // Start done: STARTING -> STARTED. | 105 // Start done: STARTING -> STARTED. |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 // The RTP dump handler responsible for creating the RTP header dump files. | 209 // The RTP dump handler responsible for creating the RTP header dump files. |
| 210 scoped_ptr<WebRtcRtpDumpHandler> rtp_dump_handler_; | 210 scoped_ptr<WebRtcRtpDumpHandler> rtp_dump_handler_; |
| 211 | 211 |
| 212 // The callback to call when StopRtpDump is called. | 212 // The callback to call when StopRtpDump is called. |
| 213 content::RenderProcessHost::WebRtcStopRtpDumpCallback stop_rtp_dump_callback_; | 213 content::RenderProcessHost::WebRtcStopRtpDumpCallback stop_rtp_dump_callback_; |
| 214 | 214 |
| 215 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerHost); | 215 DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerHost); |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ | 218 #endif // CHROME_BROWSER_MEDIA_WEBRTC_LOGGING_HANDLER_HOST_H_ |
| OLD | NEW |