mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
Load the AccountManager in the WebRTC code.
PiperOrigin-RevId: 540036925
This commit is contained in:
@@ -196,6 +196,7 @@ cc_library(
|
||||
":comm",
|
||||
":crypto", # build_cleaner: keep
|
||||
":types",
|
||||
"//internal/account",
|
||||
"//internal/flags:nearby_flags",
|
||||
"//internal/platform:base",
|
||||
"//internal/platform:cancellation_flag",
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "internal/account/account_manager_impl.h"
|
||||
#include "internal/platform/logging.h"
|
||||
#include "webrtc/api/task_queue/default_task_queue_factory.h"
|
||||
|
||||
@@ -29,7 +30,9 @@ namespace windows {
|
||||
WebRtcSignalingMessenger::WebRtcSignalingMessenger(
|
||||
absl::string_view self_id,
|
||||
const location::nearby::connections::LocationHint& location_hint)
|
||||
: self_id_(self_id), location_hint_(location_hint) {}
|
||||
: self_id_(self_id),
|
||||
location_hint_(location_hint),
|
||||
account_manager_(nearby::AccountManagerImpl::Factory::instance()) {}
|
||||
// TODO(b/261663238): replace with real implementation.
|
||||
bool WebRtcSignalingMessenger::SendMessage(absl::string_view peer_id,
|
||||
const ByteArray& message) {
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "internal/account/account_manager.h"
|
||||
#include "internal/platform/implementation/webrtc.h"
|
||||
|
||||
namespace nearby {
|
||||
@@ -44,6 +45,7 @@ class WebRtcSignalingMessenger : public api::WebRtcSignalingMessenger {
|
||||
private:
|
||||
std::string self_id_;
|
||||
location::nearby::connections::LocationHint location_hint_;
|
||||
AccountManager* account_manager_;
|
||||
};
|
||||
|
||||
class WebRtcMedium : public api::WebRtcMedium {
|
||||
|
||||
Reference in New Issue
Block a user