#include "base/basictypes.h"
#include "base/memory/shared_memory.h"
+#include "chrome/common/media/webrtc_logging_message_data.h"
#include "content/public/browser/browser_message_filter.h"
#include "net/base/net_util.h"
upload_log_on_render_close_ = should_upload;
}
+ // Starts dumping the RTP headers for the specified direction. Must be called
+ // on the IO thread. |incoming| and |outgoing| specifies which direction(s) of
+ // RTP packets should be dumped. |callback| will be called when starting the
+ // dump is done.
+ void StartRtpDump(bool incoming,
+ bool outgoing,
+ const GenericDoneCallback& callback);
+
+ // Stops dumping the RTP headers for the specified direction. Must be called
+ // on the IO thread. |incoming| and |outgoing| specifies which direction(s) of
+ // RTP packet dumping should be stopped. |callback| will be called when
+ // stopping the dump is done.
+ void StopRtpDump(bool incoming,
+ bool outgoing,
+ const GenericDoneCallback& callback);
+
private:
// States used for protecting from function calls made at non-allowed points
// in time. For example, StartLogging() is only allowed in CLOSED state.
bool* message_was_ok) OVERRIDE;
// Handles log message requests from renderer process.
- void OnAddLogMessage(const std::string& message);
+ void OnAddLogMessages(const std::vector<WebRtcLoggingMessageData>& messages);
void OnLoggingStoppedInRenderer();
// Handles log message requests from browser process.
- void AddLogMessageFromBrowser(const std::string& message);
+ void AddLogMessageFromBrowser(const WebRtcLoggingMessageData& message);
void StartLoggingIfAllowed();
void DoStartLogging();
// It's only accessed on the IO thread.
base::SharedMemoryHandle foreign_memory_handle_;
+ // The system time in ms when logging is started. Reset when logging_state_
+ // changes to STOPPED.
+ base::Time logging_started_time_;
+
DISALLOW_COPY_AND_ASSIGN(WebRtcLoggingHandlerHost);
};