From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- dom/media/doctor/DDLogValue.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 dom/media/doctor/DDLogValue.h (limited to 'dom/media/doctor/DDLogValue.h') diff --git a/dom/media/doctor/DDLogValue.h b/dom/media/doctor/DDLogValue.h new file mode 100644 index 0000000000..9a8253916f --- /dev/null +++ b/dom/media/doctor/DDLogValue.h @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* vim:set ts=2 sw=2 sts=2 et cindent: */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef DDLogValue_h_ +#define DDLogValue_h_ + +#include "DDLogObject.h" +#include "MediaResult.h" +#include "mozilla/Variant.h" +#include "nsString.h" + +namespace mozilla { + +// Placeholder when no value is needed. +struct DDNoValue {}; + +// Value capturing a range (typically an offset and a number of bytes in a +// resource). +struct DDRange { + const int64_t mOffset; + const int64_t mBytes; + DDRange(int64_t aOffset, int64_t aBytes) : mOffset(aOffset), mBytes(aBytes) {} +}; + +// Value associated with a log message. +using DDLogValue = Variant; + +void AppendToString(const DDLogValue& aValue, nsCString& aString); + +class JSONWriter; +void ToJSON(const DDLogValue& aValue, JSONWriter& aJSONWriter, + const char* aPropertyName); + +} // namespace mozilla + +#endif // DDLogValue_h_ -- cgit v1.2.3