summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/common/peerconnection
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/third_party/blink/common/peerconnection
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/blink/common/peerconnection')
-rw-r--r--chromium/third_party/blink/common/peerconnection/OWNERS4
-rw-r--r--chromium/third_party/blink/common/peerconnection/peer_connection_tracker_mojom_traits.cc58
2 files changed, 62 insertions, 0 deletions
diff --git a/chromium/third_party/blink/common/peerconnection/OWNERS b/chromium/third_party/blink/common/peerconnection/OWNERS
new file mode 100644
index 00000000000..5ab7d5845f7
--- /dev/null
+++ b/chromium/third_party/blink/common/peerconnection/OWNERS
@@ -0,0 +1,4 @@
+file://third_party/blink/renderer/modules/peerconnection/OWNERS
+
+per-file *_mojom_traits*.*=set noparent
+per-file *_mojom_traits*.*=file://ipc/SECURITY_OWNERS
diff --git a/chromium/third_party/blink/common/peerconnection/peer_connection_tracker_mojom_traits.cc b/chromium/third_party/blink/common/peerconnection/peer_connection_tracker_mojom_traits.cc
new file mode 100644
index 00000000000..030a61e64db
--- /dev/null
+++ b/chromium/third_party/blink/common/peerconnection/peer_connection_tracker_mojom_traits.cc
@@ -0,0 +1,58 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "third_party/blink/public/common/peerconnection/peer_connection_tracker_mojom_traits.h"
+
+#include "base/notreached.h"
+
+namespace mojo {
+
+// static
+blink::mojom::DeviceThermalState
+EnumTraits<blink::mojom::DeviceThermalState,
+ base::PowerObserver::DeviceThermalState>::
+ ToMojom(base::PowerObserver::DeviceThermalState type) {
+ switch (type) {
+ case base::PowerObserver::DeviceThermalState::kUnknown:
+ return blink::mojom::DeviceThermalState::kUnknown;
+ case base::PowerObserver::DeviceThermalState::kNominal:
+ return blink::mojom::DeviceThermalState::kNominal;
+ case base::PowerObserver::DeviceThermalState::kFair:
+ return blink::mojom::DeviceThermalState::kFair;
+ case base::PowerObserver::DeviceThermalState::kSerious:
+ return blink::mojom::DeviceThermalState::kSerious;
+ case base::PowerObserver::DeviceThermalState::kCritical:
+ return blink::mojom::DeviceThermalState::kCritical;
+ }
+ NOTREACHED();
+ return blink::mojom::DeviceThermalState::kUnknown;
+}
+
+// static
+bool EnumTraits<blink::mojom::DeviceThermalState,
+ base::PowerObserver::DeviceThermalState>::
+ FromMojom(blink::mojom::DeviceThermalState input,
+ base::PowerObserver::DeviceThermalState* out) {
+ switch (input) {
+ case blink::mojom::DeviceThermalState::kUnknown:
+ *out = base::PowerObserver::DeviceThermalState::kUnknown;
+ return true;
+ case blink::mojom::DeviceThermalState::kNominal:
+ *out = base::PowerObserver::DeviceThermalState::kNominal;
+ return true;
+ case blink::mojom::DeviceThermalState::kFair:
+ *out = base::PowerObserver::DeviceThermalState::kFair;
+ return true;
+ case blink::mojom::DeviceThermalState::kSerious:
+ *out = base::PowerObserver::DeviceThermalState::kSerious;
+ return true;
+ case blink::mojom::DeviceThermalState::kCritical:
+ *out = base::PowerObserver::DeviceThermalState::kCritical;
+ return true;
+ }
+ NOTREACHED();
+ return false;
+}
+
+} // namespace mojo