mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Remove unused methods.
PiperOrigin-RevId: 657298529
This commit is contained in:
committed by
Copybara-Service
parent
cd9ce0d924
commit
d3ef98dd43
@@ -360,6 +360,7 @@ cc_library(
|
||||
"//sharing/proto:enums_cc_proto",
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/synchronization",
|
||||
|
||||
@@ -165,9 +165,6 @@ void FakeNearbySharingService::Open(
|
||||
status_codes_callback(StatusCodes::kOk);
|
||||
}
|
||||
|
||||
// Opens an url target on a browser instance.
|
||||
void FakeNearbySharingService::OpenUrl(const ::nearby::network::Url& url) {}
|
||||
|
||||
// Copies text to cache/clipboard.
|
||||
void FakeNearbySharingService::CopyText(absl::string_view text) {}
|
||||
|
||||
|
||||
@@ -20,8 +20,10 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "internal/base/observer_list.h"
|
||||
#include "sharing/advertisement.h"
|
||||
#include "sharing/attachment_container.h"
|
||||
#include "sharing/internal/api/sharing_rpc_notifier.h"
|
||||
#include "sharing/local_device_data/nearby_share_local_device_data_manager.h"
|
||||
@@ -112,9 +114,6 @@ class FakeNearbySharingService : public NearbySharingService {
|
||||
std::function<void(StatusCodes status_codes)> status_codes_callback)
|
||||
override;
|
||||
|
||||
// Opens an url target on a browser instance.
|
||||
void OpenUrl(const ::nearby::network::Url& url) override;
|
||||
|
||||
// Copies text to cache/clipboard.
|
||||
void CopyText(absl::string_view text) override;
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "absl/time/time.h"
|
||||
#include "internal/network/url.h"
|
||||
#include "sharing/advertisement.h"
|
||||
#include "sharing/attachment_container.h"
|
||||
#include "sharing/internal/api/sharing_rpc_notifier.h"
|
||||
@@ -241,9 +240,6 @@ class NearbySharingService {
|
||||
std::unique_ptr<AttachmentContainer> attachment_container,
|
||||
std::function<void(StatusCodes status_codes)> status_codes_callback) = 0;
|
||||
|
||||
// Opens an url target on a browser instance.
|
||||
virtual void OpenUrl(const ::nearby::network::Url& url) = 0;
|
||||
|
||||
// Copies text to cache/clipboard.
|
||||
virtual void CopyText(absl::string_view text) = 0;
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ class NearbySharingServiceExtension {
|
||||
// Opens attachments from the remote |share_target|.
|
||||
NearbySharingService::StatusCodes Open(const AttachmentContainer& container);
|
||||
|
||||
// Opens an url target on a browser instance.
|
||||
void OpenUrl(const ::nearby::network::Url& url);
|
||||
|
||||
// Copies text to cache/clipboard.
|
||||
void CopyText(absl::string_view text);
|
||||
|
||||
@@ -48,6 +45,9 @@ class NearbySharingServiceExtension {
|
||||
std::string GetQrCodeUrl() const { return qr_code_url_; }
|
||||
|
||||
private:
|
||||
// Opens an url target on a browser instance.
|
||||
void OpenUrl(const ::nearby::network::Url& url);
|
||||
|
||||
Context* context_ = nullptr;
|
||||
NearbyShareSettings* settings_ = nullptr;
|
||||
|
||||
|
||||
@@ -999,11 +999,6 @@ void NearbySharingServiceImpl::Open(
|
||||
});
|
||||
}
|
||||
|
||||
void NearbySharingServiceImpl::OpenUrl(const ::nearby::network::Url& url) {
|
||||
RunOnAnyThread("api_open_url",
|
||||
[this, url]() { service_extension_->OpenUrl(url); });
|
||||
}
|
||||
|
||||
void NearbySharingServiceImpl::CopyText(absl::string_view text) {
|
||||
RunOnAnyThread("api_copy_text", [this, text = std::string(text)]() {
|
||||
service_extension_->CopyText(text);
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
#include "absl/types/span.h"
|
||||
#include "internal/analytics/event_logger.h"
|
||||
#include "internal/base/observer_list.h"
|
||||
#include "internal/network/url.h"
|
||||
#include "internal/platform/device_info.h"
|
||||
#include "internal/platform/implementation/account_manager.h"
|
||||
#include "internal/platform/task_runner.h"
|
||||
@@ -170,7 +169,6 @@ class NearbySharingServiceImpl
|
||||
std::unique_ptr<AttachmentContainer> attachment_container,
|
||||
std::function<void(StatusCodes status_codes)> status_codes_callback)
|
||||
override;
|
||||
void OpenUrl(const ::nearby::network::Url& url) override;
|
||||
void CopyText(absl::string_view text) override;
|
||||
void JoinWifiNetwork(absl::string_view ssid,
|
||||
absl::string_view password) override;
|
||||
|
||||
Reference in New Issue
Block a user