BEGIN_PUBLIC

Microsoft has updated the winrt library
END_PUBLC

PiperOrigin-RevId: 387168248
This commit is contained in:
hai007
2021-07-29 03:27:37 -07:00
committed by Janusz Sobczak
parent 09e65aeddb
commit b1815095dd
1579 changed files with 967 additions and 20157 deletions
+9 -8
View File
@@ -1,3 +1,4 @@
licenses(["notice"])
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,18 +35,18 @@ cc_library(
"//core/internal:__subpackages__",
],
deps = [
"//location/nearby/mediums/proto:web_rtc_signaling_frames_cc_proto",
"//absl/memory",
"//absl/strings",
"//absl/time",
"//core:core_types",
"//core/internal/mediums:utils",
"//platform/base",
"//platform/public:comm",
"//platform/public:logging",
"//platform/public:types",
"//location/nearby/mediums/proto:web_rtc_signaling_frames_cc_proto",
"//absl/memory",
"//absl/strings",
"//absl/time",
"//webrtc/api:libjingle_peerconnection_api",
"//webrtc/pc:peerconnection",
"//third_party/webrtc/files/stable/webrtc/pc:peerconnection",
],
)
@@ -61,14 +62,14 @@ cc_test(
tags = ["notsan"], # NOTE(b/139734036): known data race in usrsctplib.
deps = [
":webrtc",
"//net/proto2/compat/public:proto2",
"//testing/base/public:gunit_main",
"//absl/time",
"//platform/base",
"//platform/base:test_util",
"//platform/impl/g3", # buildcleaner: keep
"//platform/public:comm",
"//platform/public:types",
"//net/proto2/public:proto2",
"//testing/base/public:gunit_main",
"//absl/time",
"//webrtc/api:libjingle_peerconnection_api",
"//webrtc/api:rtc_error",
"//webrtc/api:scoped_refptr",
@@ -17,14 +17,14 @@
#include <iterator>
#include <memory>
#include "absl/memory/memory.h"
#include "absl/time/time.h"
#include "core/internal/mediums/webrtc/session_description_wrapper.h"
#include "core/internal/mediums/webrtc/webrtc_socket.h"
#include "core/internal/mediums/webrtc/webrtc_socket_wrapper.h"
#include "platform/public/logging.h"
#include "platform/public/mutex_lock.h"
#include "platform/public/webrtc.h"
#include "absl/memory/memory.h"
#include "absl/time/time.h"
#include "webrtc/api/data_channel_interface.h"
#include "webrtc/api/jsep.h"
@@ -522,8 +522,7 @@ bool ConnectionFlow::RunOnSignalingThread(Runnable&& runnable) {
// (signaling thread). This guarantees that if the weak_ptr is valid
// when this task starts, it will stay valid until the task ends.
if (!can_run_tasks.lock()) {
NEARBY_LOG(INFO,
"Peer connection already closed. Cannot run tasks.");
NEARBY_LOG(INFO, "Peer connection already closed. Cannot run tasks.");
return;
}
task();
@@ -17,15 +17,15 @@
#include <memory>
#include <vector>
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/time/time.h"
#include "core/internal/mediums/webrtc/session_description_wrapper.h"
#include "core/internal/mediums/webrtc/webrtc_socket_wrapper.h"
#include "platform/base/byte_array.h"
#include "platform/base/medium_environment.h"
#include "platform/public/count_down_latch.h"
#include "platform/public/webrtc.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "absl/time/time.h"
#include "webrtc/api/data_channel_interface.h"
#include "webrtc/api/jsep.h"
#include "webrtc/api/rtc_error.h"
+1 -1
View File
@@ -16,9 +16,9 @@
#include <sstream>
#include "core/internal/mediums/utils.h"
#include "absl/strings/ascii.h"
#include "absl/strings/escaping.h"
#include "core/internal/mediums/utils.h"
namespace location {
namespace nearby {
@@ -16,10 +16,10 @@
#include <memory>
#include "platform/base/byte_array.h"
#include "platform/public/crypto.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/base/byte_array.h"
#include "platform/public/crypto.h"
namespace location {
namespace nearby {
@@ -17,9 +17,9 @@
#include <vector>
#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h"
#include "core/internal/mediums/webrtc/peer_id.h"
#include "platform/base/byte_array.h"
#include "location/nearby/mediums/proto/web_rtc_signaling_frames.pb.h"
#include "webrtc/api/peer_connection_interface.h"
namespace location {
@@ -16,10 +16,10 @@
#include <memory>
#include "core/internal/mediums/webrtc/peer_id.h"
#include "net/proto2/public/text_format.h"
#include "google/protobuf/text_format.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "core/internal/mediums/webrtc/peer_id.h"
namespace location {
namespace nearby {
@@ -59,16 +59,16 @@ WebRtcSocket::WebRtcSocket(
rtc::scoped_refptr<webrtc::DataChannelInterface> data_channel)
: name_(name), data_channel_(std::move(data_channel)) {
NEARBY_LOGS(INFO) << "WebRtcSocket::WebRtcSocket(" << name_
<< ") this: " << this;
<< ") this: " << this;
data_channel_->RegisterObserver(this);
}
WebRtcSocket::~WebRtcSocket() {
NEARBY_LOGS(INFO) << "WebRtcSocket::~WebRtcSocket(" << name_
<< ") this: " << this;
<< ") this: " << this;
Close();
NEARBY_LOGS(INFO) << "WebRtcSocket::~WebRtcSocket(" << name_
<< ") this: " << this << " done";
<< ") this: " << this << " done";
}
InputStream& WebRtcSocket::GetInputStream() { return pipe_.GetInputStream(); }
@@ -85,7 +85,7 @@ void WebRtcSocket::Close() {
// is not fully closed when this call is done.
data_channel_->Close();
NEARBY_LOGS(INFO) << "WebRtcSocket::Close(" << name_ << ") this: " << this
<< " done";
<< " done";
}
void WebRtcSocket::OnStateChange() {
@@ -150,15 +150,15 @@ bool WebRtcSocket::IsClosed() { return closed_.Get(); }
void WebRtcSocket::ClosePipe() {
NEARBY_LOGS(INFO) << "WebRtcSocket::ClosePipe(" << name_
<< ") this: " << this;
<< ") this: " << this;
// This is thread-safe to close these sockets even if a read or write is in
// process on another thread, Close will wait for the exclusive mutex before
// setting state.
pipe_.GetInputStream().Close();
pipe_.GetOutputStream().Close();
WakeUpWriter();
NEARBY_LOGS(INFO) << "WebRtcSocket::ClosePipe(" << name_
<< ") this: " << this << " done";
NEARBY_LOGS(INFO) << "WebRtcSocket::ClosePipe(" << name_ << ") this: " << this
<< " done";
}
// Must not be called on signalling thread.
@@ -16,9 +16,9 @@
#include <memory>
#include "platform/base/byte_array.h"
#include "gmock/gmock.h"
#include "gtest/gtest.h"
#include "platform/base/byte_array.h"
#include "webrtc/api/data_channel_interface.h"
namespace location {