mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-03-21 06:20:55 +01:00
- Mac: Xcode 12.2 and the MacOS 11.0 SDK are now required for building. - MacOS 10.10 (Yosemite) is no longer supported (see https://crbug.com/1126056). - Flash is no longer supported (see https://www.chromium.org/flash-roadmap).
71 lines
2.5 KiB
Diff
71 lines
2.5 KiB
Diff
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.cc chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
|
index 1ddf613c138f..00c497b67533 100644
|
|
--- chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
|
+++ chrome/browser/sharesheet/sharesheet_service_delegate.cc
|
|
@@ -21,8 +21,10 @@ SharesheetServiceDelegate::SharesheetServiceDelegate(
|
|
content::WebContents* web_contents,
|
|
SharesheetService* sharesheet_service)
|
|
: id_(id),
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_(
|
|
std::make_unique<SharesheetBubbleView>(web_contents, this)),
|
|
+#endif
|
|
sharesheet_service_(sharesheet_service) {}
|
|
|
|
SharesheetServiceDelegate::~SharesheetServiceDelegate() = default;
|
|
@@ -31,18 +33,24 @@ void SharesheetServiceDelegate::ShowBubble(
|
|
std::vector<TargetInfo> targets,
|
|
apps::mojom::IntentPtr intent,
|
|
sharesheet::CloseCallback close_callback) {
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_->ShowBubble(std::move(targets), std::move(intent),
|
|
std::move(close_callback));
|
|
+#endif
|
|
}
|
|
|
|
void SharesheetServiceDelegate::OnBubbleClosed(
|
|
const base::string16& active_action) {
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_.release();
|
|
+#endif
|
|
sharesheet_service_->OnBubbleClosed(id_, active_action);
|
|
}
|
|
|
|
void SharesheetServiceDelegate::OnActionLaunched() {
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_->ShowActionView();
|
|
+#endif
|
|
}
|
|
|
|
void SharesheetServiceDelegate::OnTargetSelected(
|
|
@@ -66,11 +74,15 @@ void SharesheetServiceDelegate::SetSharesheetSize(const int& width,
|
|
const int& height) {
|
|
DCHECK_GT(width, 0);
|
|
DCHECK_GT(height, 0);
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_->ResizeBubble(width, height);
|
|
+#endif
|
|
}
|
|
|
|
void SharesheetServiceDelegate::CloseSharesheet() {
|
|
+#if defined(OS_CHROMEOS)
|
|
sharesheet_bubble_view_->CloseBubble();
|
|
+#endif
|
|
}
|
|
|
|
const gfx::VectorIcon* SharesheetServiceDelegate::GetVectorIcon(
|
|
diff --git chrome/browser/sharesheet/sharesheet_service_delegate.h chrome/browser/sharesheet/sharesheet_service_delegate.h
|
|
index e957b2c39772..80d9dc7b6c76 100644
|
|
--- chrome/browser/sharesheet/sharesheet_service_delegate.h
|
|
+++ chrome/browser/sharesheet/sharesheet_service_delegate.h
|
|
@@ -64,7 +64,9 @@ class SharesheetServiceDelegate : public SharesheetController {
|
|
private:
|
|
const uint32_t id_;
|
|
base::string16 active_action_;
|
|
+#if defined(OS_CHROMEOS)
|
|
std::unique_ptr<SharesheetBubbleView> sharesheet_bubble_view_;
|
|
+#endif
|
|
SharesheetService* sharesheet_service_;
|
|
};
|
|
|