Commit 5aea6042 authored by Palak Agarwal's avatar Palak Agarwal Committed by Commit Bot

Implement the confirmation-box for getCurrentBrowsingContextMedia API.

Rebased on top of https://chromium-review.googlesource.com/c/chromium/src/+/2502628

UI without audio capture: https://drive.google.com/file/d/1SA9vuDOkQjnioBfmAaiOjqoXGBUmVw22/view?usp=sharing
UI with audio capture: https://drive.google.com/file/d/1jcncgHsF6L_o3D5Jc3UJ6pkjwQAKtoVl/view?usp=sharing

This change relates to the UI code that is added to support the new getCurrentBrowsingContextMedia API.

This is an API for capturing the current tab.

Design doc:
go/get-current-browsing-context-media

Intent-to-Prototype:
https://groups.google.com/u/3/a/chromium.org/g/blink-dev/c/NYVbRRBlABI/m/MJEzcyEUCQAJ

PR against spec:
https://github.com/w3c/mediacapture-screen-share/pull/148


Bug: 1136942

Change-Id: I8e72023d944df3d7e996ad3acea7527c34569868
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2489991
Commit-Queue: Palak Agarwal <agpalak@chromium.org>
Reviewed-by: default avatarGuido Urdaneta <guidou@chromium.org>
Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Reviewed-by: default avatarElad Alon <eladalon@chromium.org>
Reviewed-by: default avatarElly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831017}
parent 9862cfb3
......@@ -9752,6 +9752,21 @@ Please help our engineers fix this problem. Tell us what happened right before y
<message name="IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there are multiple monitors.">
{SCREEN_INDEX, plural, =1{Screen #} other{Screen #}}
</message>
<!-- Confirmation dialog for getCurrentBrowsingContextMedia API -->
<message name="IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_TITLE" desc="Title for the confirmation dialog shown when getCurrentBrowsingContextMedia is requested by an app.">
Share this tab
</message>
<message name="IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_TEXT_REQUESTED_BY_APP" desc="Text for the confirmation dialog shown when getCurrentBrowsingContextMedia is requested by an app.">
<ph name="TARGET_NAME">$1<ex>https://google.com</ex></ph> is asking for permission to capture the contents of this tab.
</message>
<message name="IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_AUDIO_SHARE" desc="Text for the checkbox on the confirmation dialog for getCurrentBrowsingContextMedia API, when checked, audio will be shared, otherwise just video sharing">
Share audio
</message>
<message name="IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_SHARE_BUTTON" desc="Used for Share on buttons">
Share
</message>
<!-- Local Device Discovery display strings -->
<if expr="enable_service_discovery">
<message name="IDS_LOCAL_DISCOVERY_NOTIFICATION_TITLE_PRINTER" desc="Title of notification for one or more new printer showing up on your network. [ICU Syntax]">
......
282e4397adbf6cbc51adad6fca84783715c4681a
\ No newline at end of file
......@@ -470,7 +470,7 @@ void DesktopCaptureAccessHandler::ProcessChangeSourceRequest(
if (!base::FeatureList::IsEnabled(
features::kDesktopCaptureTabSharingInfobar) ||
request.requested_video_device_id.empty()) {
picker = picker_factory_->CreatePicker();
picker = picker_factory_->CreatePicker(&request);
if (!picker) {
std::move(callback).Run(
blink::MediaStreamDevices(),
......
......@@ -15,6 +15,7 @@
#include "base/optional.h"
#include "base/strings/string16.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/media_stream_request.h"
#include "content/public/browser/web_contents_observer.h"
#include "ui/base/ui_base_types.h"
#include "ui/gfx/native_widget_types.h"
......@@ -25,8 +26,10 @@ namespace content {
class WebContents;
}
// Abstract interface for desktop media picker UI. It's used by Desktop Media
// API and by ARC to let user choose a desktop media source.
// Base class for desktop media picker UI. It's used by Desktop Media API, and
// by ARC to let user choose a desktop media source. It is also used by
// getCurrentBrowsingContextMedia API to request user's permission to share the
// current browser context.
//
// TODO(crbug.com/987001): Rename this class.
class DesktopMediaPicker {
......@@ -68,12 +71,14 @@ class DesktopMediaPicker {
bool select_only_screen = false;
};
// Creates default implementation of DesktopMediaPicker for the current
// platform.
static std::unique_ptr<DesktopMediaPicker> Create();
// Creates a picker dialog/confirmation box depending on the value of
// |request|. If no request is available the default picker, namely
// DesktopMediaPickerViews is used.
static std::unique_ptr<DesktopMediaPicker> Create(
const content::MediaStreamRequest* request = nullptr);
DesktopMediaPicker() {}
virtual ~DesktopMediaPicker() {}
DesktopMediaPicker() = default;
virtual ~DesktopMediaPicker() = default;
// Shows dialog with list of desktop media sources (screens, windows, tabs)
// provided by |sources_lists|.
......
......@@ -101,7 +101,7 @@ void DesktopMediaPickerController::OnInitialMediaListFound() {
}
void DesktopMediaPickerController::ShowPickerDialog() {
picker_ = picker_factory_->CreatePicker();
picker_ = picker_factory_->CreatePicker(/*request=*/nullptr);
if (!picker_) {
OnPickerDialogResults(
"Desktop Capture API is not yet implemented for this platform.", {});
......
......@@ -46,7 +46,9 @@ class MockDesktopMediaList : public DesktopMediaList {
class MockDesktopMediaPickerFactory : public DesktopMediaPickerFactory {
public:
MOCK_METHOD0(CreatePicker, std::unique_ptr<DesktopMediaPicker>());
MOCK_METHOD1(CreatePicker,
std::unique_ptr<DesktopMediaPicker>(
const content::MediaStreamRequest* request));
MOCK_METHOD1(CreateMediaList,
std::vector<std::unique_ptr<DesktopMediaList>>(
const std::vector<content::DesktopMediaID::Type>& types));
......@@ -55,9 +57,10 @@ class MockDesktopMediaPickerFactory : public DesktopMediaPickerFactory {
class DesktopMediaPickerControllerTest : public testing::Test {
public:
void SetUp() override {
ON_CALL(factory_, CreatePicker).WillByDefault([this]() {
return std::unique_ptr<DesktopMediaPicker>(std::move(picker_));
});
ON_CALL(factory_, CreatePicker)
.WillByDefault([this](const content::MediaStreamRequest* request) {
return std::unique_ptr<DesktopMediaPicker>(std::move(picker_));
});
ON_CALL(factory_, CreateMediaList).WillByDefault([this](const auto& types) {
std::vector<std::unique_ptr<DesktopMediaList>> lists;
lists.push_back(std::move(media_list_));
......@@ -80,7 +83,7 @@ class DesktopMediaPickerControllerTest : public testing::Test {
// Test that the picker dialog is shown and the selected media ID is returned.
TEST_F(DesktopMediaPickerControllerTest, ShowPicker) {
EXPECT_CALL(factory_, CreatePicker());
EXPECT_CALL(factory_, CreatePicker(nullptr));
EXPECT_CALL(factory_, CreateMediaList(source_types_));
EXPECT_CALL(done_, Run("", media_id_));
EXPECT_CALL(*picker_, Show)
......@@ -95,7 +98,7 @@ TEST_F(DesktopMediaPickerControllerTest, ShowPicker) {
// Test that a null result is returned in response to WebContentsDestroyed().
TEST_F(DesktopMediaPickerControllerTest, WebContentsDestroyed) {
EXPECT_CALL(factory_, CreatePicker());
EXPECT_CALL(factory_, CreatePicker(nullptr));
EXPECT_CALL(factory_, CreateMediaList(source_types_));
EXPECT_CALL(done_, Run("", content::DesktopMediaID()));
EXPECT_CALL(*picker_, Show);
......@@ -113,7 +116,7 @@ TEST_F(DesktopMediaPickerControllerTest, ShowSingleScreen) {
source.id = media_id_;
source.name = base::ASCIIToUTF16("fake name");
EXPECT_CALL(factory_, CreatePicker()).Times(0);
EXPECT_CALL(factory_, CreatePicker(nullptr)).Times(0);
EXPECT_CALL(factory_, CreateMediaList(source_types_));
EXPECT_CALL(done_, Run("", source.id));
EXPECT_CALL(*picker_, Show).Times(0);
......
......@@ -12,6 +12,7 @@
#include "chrome/browser/media/webrtc/desktop_media_list.h"
#include "chrome/browser/media/webrtc/desktop_media_picker.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/media_stream_request.h"
// Interface for factory creating DesktopMediaList and DesktopMediaPicker
// instances.
......@@ -19,7 +20,8 @@ class DesktopMediaPickerFactory {
public:
virtual ~DesktopMediaPickerFactory();
virtual std::unique_ptr<DesktopMediaPicker> CreatePicker() = 0;
virtual std::unique_ptr<DesktopMediaPicker> CreatePicker(
const content::MediaStreamRequest* request) = 0;
virtual std::vector<std::unique_ptr<DesktopMediaList>> CreateMediaList(
const std::vector<content::DesktopMediaID::Type>& types) = 0;
......
......@@ -22,12 +22,12 @@ DesktopMediaPickerFactoryImpl* DesktopMediaPickerFactoryImpl::GetInstance() {
return impl.get();
}
std::unique_ptr<DesktopMediaPicker>
DesktopMediaPickerFactoryImpl::CreatePicker() {
std::unique_ptr<DesktopMediaPicker> DesktopMediaPickerFactoryImpl::CreatePicker(
const content::MediaStreamRequest* request) {
// DesktopMediaPicker is implemented only for Windows, OSX and Aura Linux
// builds.
#if defined(TOOLKIT_VIEWS) || defined(OS_MAC)
return DesktopMediaPicker::Create();
#if defined(TOOLKIT_VIEWS)
return DesktopMediaPicker::Create(request);
#else
return nullptr;
#endif
......
......@@ -12,6 +12,7 @@
#include "chrome/browser/media/webrtc/desktop_media_picker.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_factory.h"
#include "content/public/browser/desktop_media_id.h"
#include "content/public/browser/media_stream_request.h"
// Factory creating DesktopMediaList and DesktopMediaPicker instances.
class DesktopMediaPickerFactoryImpl : public DesktopMediaPickerFactory {
......@@ -24,7 +25,8 @@ class DesktopMediaPickerFactoryImpl : public DesktopMediaPickerFactory {
// DesktopMediaPickerFactory implementation
// Can return |nullptr| if platform doesn't support DesktopMediaPicker.
std::unique_ptr<DesktopMediaPicker> CreatePicker() override;
std::unique_ptr<DesktopMediaPicker> CreatePicker(
const content::MediaStreamRequest* request) override;
std::vector<std::unique_ptr<DesktopMediaList>> CreateMediaList(
const std::vector<content::DesktopMediaID::Type>& types) override;
......
......@@ -138,17 +138,8 @@ void DisplayMediaAccessHandler::HandleRequest(
}
#endif // defined(OS_MAC)
if (request.video_type ==
blink::mojom::MediaStreamType::DISPLAY_VIDEO_CAPTURE_THIS_TAB) {
// TODO(crbug.com/1136942): Add support for capture-this-tab instead of
// returning an error
std::move(callback).Run(
blink::MediaStreamDevices(),
blink::mojom::MediaStreamRequestResult::NOT_SUPPORTED, nullptr);
return;
}
std::unique_ptr<DesktopMediaPicker> picker = picker_factory_->CreatePicker();
std::unique_ptr<DesktopMediaPicker> picker =
picker_factory_->CreatePicker(&request);
if (!picker) {
std::move(callback).Run(
blink::MediaStreamDevices(),
......
......@@ -84,8 +84,8 @@ void FakeDesktopMediaPickerFactory::SetTestFlags(TestFlags* test_flags,
current_test_ = 0;
}
std::unique_ptr<DesktopMediaPicker>
FakeDesktopMediaPickerFactory::CreatePicker() {
std::unique_ptr<DesktopMediaPicker> FakeDesktopMediaPickerFactory::CreatePicker(
const content::MediaStreamRequest* request) {
EXPECT_LE(current_test_, tests_count_);
if (current_test_ >= tests_count_)
return std::unique_ptr<DesktopMediaPicker>();
......
......@@ -40,7 +40,8 @@ class FakeDesktopMediaPickerFactory : public DesktopMediaPickerFactory {
void SetTestFlags(TestFlags* test_flags, int tests_count);
FakeDesktopMediaPicker* picker() const { return picker_; }
// DesktopMediaPickerFactory implementation
std::unique_ptr<DesktopMediaPicker> CreatePicker() override;
std::unique_ptr<DesktopMediaPicker> CreatePicker(
const content::MediaStreamRequest* request) override;
std::vector<std::unique_ptr<DesktopMediaList>> CreateMediaList(
const std::vector<content::DesktopMediaID::Type>& types) override;
......
......@@ -3531,6 +3531,8 @@ static_library("ui") {
"views/desktop_capture/desktop_media_source_view.h",
"views/desktop_capture/desktop_media_tab_list.cc",
"views/desktop_capture/desktop_media_tab_list.h",
"views/desktop_capture/get_current_browsing_context_media_dialog.cc",
"views/desktop_capture/get_current_browsing_context_media_dialog.h",
"views/device_chooser_content_view.cc",
"views/device_chooser_content_view.h",
"views/devtools_process_observer.cc",
......
......@@ -295,6 +295,7 @@ enum class DialogIdentifier {
CROSTINI_RECOVERY = 103,
PARENT_PERMISSION = 104, // ChromeOS only.
SIGNIN_REAUTH = 105,
CURRENT_BROWSING_CONTEXT_CONFIRMATION_BOX = 106,
// Add values above this line with a corresponding label in
// tools/metrics/histograms/enums.xml
MAX_VALUE
......
......@@ -18,6 +18,7 @@
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/browser/ui/views/desktop_capture/desktop_media_source_view.h"
#include "chrome/browser/ui/views/desktop_capture/get_current_browsing_context_media_dialog.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
......@@ -25,6 +26,7 @@
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_stream_request.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/web_contents_delegate.h"
#include "ui/base/l10n/l10n_util.h"
......@@ -486,6 +488,12 @@ void DesktopMediaPickerViews::NotifyDialogResult(DesktopMediaID source) {
}
// static
std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create() {
return std::unique_ptr<DesktopMediaPicker>(new DesktopMediaPickerViews());
std::unique_ptr<DesktopMediaPicker> DesktopMediaPicker::Create(
const content::MediaStreamRequest* request) {
if (request &&
request->video_type ==
blink::mojom::MediaStreamType::DISPLAY_VIDEO_CAPTURE_THIS_TAB) {
return std::make_unique<GetCurrentBrowsingContextMediaDialog>();
}
return std::make_unique<DesktopMediaPickerViews>();
}
// 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 "chrome/browser/ui/views/desktop_capture/get_current_browsing_context_media_dialog.h"
#include "chrome/browser/media/webrtc/desktop_media_picker_manager.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/views/chrome_layout_provider.h"
#include "chrome/grit/generated_resources.h"
#include "components/constrained_window/constrained_window_views.h"
#include "components/web_modal/web_contents_modal_dialog_manager.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents_delegate.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/models/dialog_model.h"
#include "ui/views/controls/button/checkbox.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/box_layout.h"
namespace {
constexpr int kCheckboxId = 1;
class GetCurrentBrowsingContextMediaDialogDelegate
: public ui::DialogModelDelegate {
public:
GetCurrentBrowsingContextMediaDialogDelegate(
const DesktopMediaPicker::Params& params,
GetCurrentBrowsingContextMediaDialog* parent)
: render_process_id_(
params.web_contents->GetMainFrame()->GetProcess()->GetID()),
render_frame_id_(params.web_contents->GetMainFrame()->GetRoutingID()),
parent_(parent) {
DCHECK(parent_);
}
// Callback functions for when the permission is granted.
void OnAccept() {
// |id| is non-null if and only if it refers to a native screen/window.
content::DesktopMediaID source(content::DesktopMediaID::TYPE_WEB_CONTENTS,
/*id=*/content::DesktopMediaID::kNullId,
content::WebContentsMediaCaptureId(
render_process_id_, render_frame_id_));
source.audio_share =
dialog_model()->HasField(kCheckboxId) &&
dialog_model()->GetCheckboxByUniqueId(kCheckboxId)->is_checked();
// Gets the tab to be shared, which is the current tab in this
// case.
content::WebContents* const tab = content::WebContents::FromRenderFrameHost(
content::RenderFrameHost::FromID(render_process_id_, render_frame_id_));
// Activates the current tab and browser as confirmation that this is the
// tab being shared as the user might tab away between the time "share" was
// pressed and the actual share starts.
tab->GetDelegate()->ActivateContents(tab);
Browser* browser = chrome::FindBrowserWithWebContents(tab);
if (browser && browser->window()) {
browser->window()->Activate();
}
if (parent_) {
parent_->NotifyDialogResult(source);
parent_ = nullptr;
}
}
// Callback functions for when the permission is rejected or if the
// dialog/window is closed by the user.
void OnClose() {
if (parent_) {
parent_->NotifyDialogResult(content::DesktopMediaID());
parent_ = nullptr;
}
}
private:
// The pair of values (render_process_id_, render_frame_id_) together define
// the browsing context which is to be shared.
const int render_process_id_;
const int render_frame_id_;
GetCurrentBrowsingContextMediaDialog* parent_;
DISALLOW_COPY_AND_ASSIGN(GetCurrentBrowsingContextMediaDialogDelegate);
};
} // namespace
GetCurrentBrowsingContextMediaDialog::GetCurrentBrowsingContextMediaDialog() =
default;
GetCurrentBrowsingContextMediaDialog::~GetCurrentBrowsingContextMediaDialog() =
default;
std::unique_ptr<views::DialogDelegate>
GetCurrentBrowsingContextMediaDialog::CreateDialogHost(
const DesktopMediaPicker::Params& params) {
auto unique_model_delegate =
std::make_unique<GetCurrentBrowsingContextMediaDialogDelegate>(params,
this);
GetCurrentBrowsingContextMediaDialogDelegate* model_delegate =
unique_model_delegate.get();
ui::DialogModel::Builder dialog_builder(std::move(unique_model_delegate));
// TODO(crbug.com/1136942): Reconcile design-doc and implementation wrt
// the body text; display frame's URL.
dialog_builder
.AddBodyText(ui::DialogModelLabel(l10n_util::GetStringFUTF16(
IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_TEXT_REQUESTED_BY_APP,
params.target_name)))
.AddCancelButton(
base::BindOnce(&GetCurrentBrowsingContextMediaDialogDelegate::OnClose,
base::Unretained(model_delegate)))
.AddOkButton(
base::BindOnce(
&GetCurrentBrowsingContextMediaDialogDelegate::OnAccept,
base::Unretained(model_delegate)),
l10n_util::GetStringUTF16(
IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_SHARE_BUTTON))
.SetCloseCallback(
base::BindOnce(&GetCurrentBrowsingContextMediaDialogDelegate::OnClose,
base::Unretained(model_delegate)))
.SetTitle(l10n_util::GetStringUTF16(
IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_TITLE));
if (params.request_audio) {
dialog_builder.AddCheckbox(
kCheckboxId,
ui::DialogModelLabel(l10n_util::GetStringUTF16(
IDS_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_AUDIO_SHARE)),
ui::DialogModelCheckbox::Params().SetIsChecked(
params.approve_audio_by_default));
}
auto dialog_host = views::BubbleDialogModelHost::CreateModal(
dialog_builder.Build(), params.modality);
dialog_host->SetDefaultButton(ui::DIALOG_BUTTON_CANCEL);
dialog_host->SetOwnedByWidget(true);
dialog_model_host_for_testing_ = dialog_host.get();
return dialog_host;
}
void GetCurrentBrowsingContextMediaDialog::Show(
const DesktopMediaPicker::Params& params,
std::vector<std::unique_ptr<DesktopMediaList>> source_lists,
DoneCallback done_callback) {
DCHECK(params.web_contents);
DesktopMediaPickerManager::Get()->OnShowDialog();
callback_ = std::move(done_callback);
std::unique_ptr<views::DialogDelegate> unique_delegate =
CreateDialogHost(params);
constrained_window::ShowWebModalDialogViews(unique_delegate.release(),
params.web_contents);
chrome::RecordDialogCreation(
chrome::DialogIdentifier::CURRENT_BROWSING_CONTEXT_CONFIRMATION_BOX);
}
void GetCurrentBrowsingContextMediaDialog::NotifyDialogResult(
const content::DesktopMediaID& source) {
DesktopMediaPickerManager::Get()->OnHideDialog();
if (callback_) {
std::move(callback_).Run(source);
}
}
// 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.
#ifndef CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_H_
#define CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_H_
#include "base/macros.h"
#include "build/build_config.h"
#include "chrome/browser/media/webrtc/desktop_media_picker.h"
#include "chrome/browser/ui/views/desktop_capture/desktop_media_list_controller.h"
#include "ui/base/models/dialog_model.h"
#include "ui/base/models/dialog_model_field.h"
#include "ui/views/bubble/bubble_dialog_model_host.h"
#include "ui/views/window/dialog_delegate.h"
class GetCurrentBrowsingContextMediaDialog : public DesktopMediaPicker {
public:
GetCurrentBrowsingContextMediaDialog();
~GetCurrentBrowsingContextMediaDialog() override;
void NotifyDialogResult(const content::DesktopMediaID& source);
// DesktopMediaPicker:
void Show(const DesktopMediaPicker::Params& params,
std::vector<std::unique_ptr<DesktopMediaList>> source_lists,
DoneCallback done_callback) override;
views::BubbleDialogModelHost* GetHostForTesting() {
return dialog_model_host_for_testing_;
}
private:
// Used to create the dialog using ui::DialogModel.
std::unique_ptr<views::DialogDelegate> CreateDialogHost(
const DesktopMediaPicker::Params& params);
DoneCallback callback_;
views::BubbleDialogModelHost* dialog_model_host_for_testing_;
DISALLOW_COPY_AND_ASSIGN(GetCurrentBrowsingContextMediaDialog);
};
#endif // CHROME_BROWSER_UI_VIEWS_DESKTOP_CAPTURE_GET_CURRENT_BROWSING_CONTEXT_MEDIA_DIALOG_H_
......@@ -6009,6 +6009,7 @@ test("unit_tests") {
"../browser/ui/views/confirm_bubble_views_unittest.cc",
"../browser/ui/views/content_setting_bubble_contents_unittest.cc",
"../browser/ui/views/desktop_capture/desktop_media_picker_views_unittest.cc",
"../browser/ui/views/desktop_capture/get_current_browsing_context_media_dialog_unittest.cc",
"../browser/ui/views/device_chooser_content_view_unittest.cc",
"../browser/ui/views/download/download_in_progress_dialog_view_unittest.cc",
"../browser/ui/views/download/download_shelf_view_unittest.cc",
......
......@@ -17182,6 +17182,8 @@ metrics consent we also won't be able to send UMA metrics. -->
<int value="103" label="Crostini Recovery Dialog"/>
<int value="104" label="Parent Permission ChromeOS"/>
<int value="105" label="Signin Reauth Dialog"/>
<int value="106"
label="Confirmation Box for getCurrentBrowsingContextMedia API"/>
</enum>
<enum name="DialogOriginRelationship">
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment