Skip to content

Commit

Permalink
Remove kNullNativeWindow and kNullNativeView
Browse files Browse the repository at this point in the history
They are constexpr, which makes them interfere with plans to turn
gfx::NativeWindow and gfx::NativeView into object types, and in
many cases, because `nullptr` worked, they weren’t even used.

Replace them with value-initialization. For class types, that’s
default construction, and for pointer types, that’s a null
pointer.

Bug: 1280317
Change-Id: I20e0a38d4fdb366c0d8d78aec06d7c391c6bb062
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4604045
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Robert Liao <robliao@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Owners-Override: Avi Drissman <avi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1159161}
  • Loading branch information
Avi Drissman authored and Chromium LUCI CQ committed Jun 16, 2023
1 parent 08ae74a commit dad01b0
Show file tree
Hide file tree
Showing 97 changed files with 140 additions and 141 deletions.
2 changes: 1 addition & 1 deletion ash/login/login_screen_test_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ bool LoginScreenTestApi::PressAccelerator(const ui::Accelerator& accelerator) {
// static
bool LoginScreenTestApi::SendAcceleratorNatively(
const ui::Accelerator& accelerator) {
gfx::NativeWindow login_window = nullptr;
gfx::NativeWindow login_window = gfx::NativeWindow();
if (LockScreen::HasInstance()) {
login_window = LockScreen::Get()->widget()->GetNativeWindow();
} else {
Expand Down
2 changes: 1 addition & 1 deletion ash/system/tray/tray_bubble_view.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class ASH_EXPORT TrayBubbleView : public views::BubbleDialogDelegateView,
// `tray_bubble_view`'s destructor can be called well after it's
// corresponding tray has been cleaned up.
base::WeakPtr<Delegate> delegate = nullptr;
gfx::NativeWindow parent_window = nullptr;
gfx::NativeWindow parent_window = gfx::NativeWindow();
raw_ptr<View, ExperimentalAsh> anchor_view = nullptr;
AnchorMode anchor_mode = AnchorMode::kView;
// Only used if anchor_mode == AnchorMode::kRect.
Expand Down
2 changes: 1 addition & 1 deletion ash/webui/diagnostics_ui/backend/session_log_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ void SessionLogHandler::HandleSaveSessionLogRequest(
content::WebContents* web_contents = web_ui()->GetWebContents();
gfx::NativeWindow owning_window =
web_contents ? web_contents->GetTopLevelNativeWindow()
: gfx::kNullNativeWindow;
: gfx::NativeWindow();

// Early return if the select file dialog is already active.
if (select_file_dialog_)
Expand Down
2 changes: 1 addition & 1 deletion ash/webui/scanning/scanning_handler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ void ScanningHandler::HandleRequestScanToLocation(
content::WebContents* web_contents = web_ui()->GetWebContents();
gfx::NativeWindow owning_window =
web_contents ? web_contents->GetTopLevelNativeWindow()
: gfx::kNullNativeWindow;
: gfx::NativeWindow();
select_file_dialog_ = ui::SelectFileDialog::Create(
this, scanning_app_delegate_->CreateChromeSelectFilePolicy());
select_file_dialog_->SelectFile(
Expand Down
6 changes: 4 additions & 2 deletions chrome/browser/ash/arc/arc_support_host.cc
Original file line number Diff line number Diff line change
Expand Up @@ -246,11 +246,13 @@ void ArcSupportHost::SetErrorDelegate(ErrorDelegate* delegate) {
gfx::NativeWindow ArcSupportHost::GetNativeWindow() const {
extensions::AppWindowRegistry* registry =
extensions::AppWindowRegistry::Get(profile_);
if (!registry) return gfx::kNullNativeWindow;
if (!registry) {
return gfx::NativeWindow();
}

extensions::AppWindow* window =
registry->GetCurrentAppWindowForApp(arc::kPlayStoreAppId);
return window ? window->GetNativeWindow() : gfx::kNullNativeWindow;
return window ? window->GetNativeWindow() : gfx::NativeWindow();
}

bool ArcSupportHost::GetShouldShowRunNetworkTests() {
Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ash/crostini/crostini_file_selector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ void CrostiniFileSelector::SelectFile(
gfx::NativeWindow CrostiniFileSelector::GetBrowserWindow() {
Browser* browser =
chrome::FindBrowserWithWebContents(web_ui_->GetWebContents());
return browser ? browser->window()->GetNativeWindow()
: gfx::kNullNativeWindow;
return browser ? browser->window()->GetNativeWindow() : gfx::NativeWindow();
}

void CrostiniFileSelector::FileSelected(const base::FilePath& path,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/crostini/crostini_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class TestViewsDelegateWithContext : public ChromeTestViewsDelegate<> {
}

private:
gfx::NativeWindow context_ = nullptr;
gfx::NativeWindow context_ = gfx::NativeWindow();
};

} // namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3879,7 +3879,7 @@ FileManagerBrowserTestBase::GetLastOpenWindowWebContents() {
}

bool FileManagerBrowserTestBase::PostKeyEvent(ui::KeyEvent* key_event) {
gfx::NativeWindow native_window = nullptr;
gfx::NativeWindow native_window = gfx::NativeWindow();

content::WebContents* web_contents = GetLastOpenWindowWebContents();
if (!web_contents && swa_web_contents_.size() > 0) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/file_manager/open_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ void ExecuteFileTaskForUrl(Profile* profile,
GetFileManagerFileSystemContext(profile);

// There is no Files app window for spawned WebUI to be modal to.
gfx::NativeWindow modal_parent = nullptr;
gfx::NativeWindow modal_parent = gfx::NativeWindow();
file_tasks::ExecuteFileTask(
profile, task,
std::vector<FileSystemURL>(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ constexpr base::TimeDelta kShowSuggestionDelayMs = base::Milliseconds(5);

namespace {
gfx::NativeView GetParentView() {
gfx::NativeView parent = nullptr;
gfx::NativeView parent = gfx::NativeView();

aura::Window* active_window = ash::window_util::GetActiveWindow();
// Use MenuContainer so that it works even with a system modal dialog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void CandidateWindowControllerImpl::InitCandidateWindowView() {
if (candidate_window_view_)
return;

gfx::NativeView parent = nullptr;
gfx::NativeView parent = gfx::NativeView();

aura::Window* active_window = ash::window_util::GetActiveWindow();
// Use MenuContainer so that it works even with a system modal dialog.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class DialogDelegate : public ui::WebDialogDelegate {

base::OnceClosure close_callback_;

gfx::NativeWindow native_window_ = nullptr;
gfx::NativeWindow native_window_ = gfx::NativeWindow();
};

} // namespace login_screen_extension_ui
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@ void UserImageFileSelector::SelectFile(
gfx::NativeWindow UserImageFileSelector::GetBrowserWindow() {
Browser* browser =
chrome::FindBrowserWithWebContents(web_ui_->GetWebContents());
return browser ? browser->window()->GetNativeWindow()
: gfx::kNullNativeWindow;
return browser ? browser->window()->GetNativeWindow() : gfx::NativeWindow();
}

void UserImageFileSelector::FileSelected(const base::FilePath& path,
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ash/set_time_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class SetTimeDialog : public SystemWebDialogDelegate {

// Shows the set time/date dialog. If |parent| is not null, shows the dialog
// as a child of |parent|, e.g. the Settings window.
static void ShowDialog(gfx::NativeWindow parent = nullptr);
static void ShowDialog(gfx::NativeWindow parent = gfx::NativeWindow());

// Returns true if the dialog should show the timezone <select>.
static bool ShouldShowTimezone();
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/download/download_file_picker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ DownloadFilePicker::DownloadFilePicker(download::DownloadItem* item,
ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH;
gfx::NativeWindow owning_window =
web_contents ? platform_util::GetTopLevel(web_contents->GetNativeView())
: gfx::kNullNativeWindow;
: gfx::NativeWindow();

// If select_file_dialog_ issued by extension API,
// (e.g. chrome.downloads.download), the |owning_window| host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ void BookmarkManagerPrivateIOFunction::ShowSelectFileDialog(
file_type_info.extensions[0].push_back(FILE_PATH_LITERAL("html"));
gfx::NativeWindow owning_window =
web_contents ? platform_util::GetTopLevel(web_contents->GetNativeView())
: gfx::kNullNativeWindow;
: gfx::NativeWindow();
// |web_contents| can be nullptr (for background pages), which is fine. In
// such a case if file-selection dialogs are forbidden by policy, we will not
// show an InfoBar, which is better than letting one appear out of the blue.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ IN_PROC_BROWSER_TEST_F(BrowserActionInteractiveTest, DestroyHWNDDoesNotCrash) {
OpenPopupViaAPI(false);
auto test_util = ExtensionActionTestHelper::Create(browser());
const gfx::NativeView popup_view = test_util->GetPopupNativeView();
EXPECT_NE(static_cast<gfx::NativeView>(nullptr), popup_view);
EXPECT_NE(gfx::NativeView(), popup_view);
const HWND popup_hwnd = views::HWNDForNativeView(popup_view);
EXPECT_EQ(TRUE, ::IsWindow(popup_hwnd));
const HWND browser_hwnd =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ ChromeMessagingDelegate::CreateReceiverForNativeApp(
bool allow_user_level,
std::string* error_out) {
DCHECK(error_out);
gfx::NativeView native_view = source ? source->GetNativeView() : nullptr;
gfx::NativeView native_view =
source ? source->GetNativeView() : gfx::NativeView();
std::unique_ptr<NativeMessageHost> native_host =
NativeMessageHost::Create(browser_context, native_view, extension_id,
native_app_name, allow_user_level, error_out);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ void PrintJobSubmitter::ShowPrintJobConfirmationDialog(
// |native_window_| appropriately.
if (native_window_tracker_ &&
native_window_tracker_->WasNativeWindowDestroyed())
native_window_ = gfx::kNullNativeWindow;
native_window_ = gfx::NativeWindow();

extensions::ShowPrintJobConfirmationDialog(
native_window_, extension_->id(), base::UTF8ToUTF16(extension_->name()),
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/media/capture_access_handler_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ void CaptureAccessHandlerBase::AddCaptureSession(int render_process_id,
// Assume that the target is the same tab that is
// requesting capture, not the display or any particular
// window. This can be changed by calling UpdateTarget().
content::DesktopMediaID::TYPE_WEB_CONTENTS, gfx::kNullNativeWindow};
content::DesktopMediaID::TYPE_WEB_CONTENTS, gfx::NativeWindow()};

sessions_.push_back(std::move(session));
}
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/media/output_protection_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace {
gfx::NativeView GetRenderFrameView(int render_process_id, int render_frame_id) {
auto* host =
content::RenderFrameHost::FromID(render_process_id, render_frame_id);
return host ? host->GetNativeView() : gfx::kNullNativeView;
return host ? host->GetNativeView() : gfx::NativeView();
}

#if BUILDFLAG(IS_CHROMEOS_LACROS)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ bool IsRequestApproved(content::WebContents* web_contents,
gfx::NativeWindow parent_window =
FindParentWindowForWebContents(web_contents);
#else
gfx::NativeWindow parent_window = nullptr;
gfx::NativeWindow parent_window = gfx::NativeWindow();
#endif
const std::u16string application_name = base::UTF8ToUTF16(
extension ? extension->name() : request.security_origin.spec());
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/media/webrtc/desktop_media_picker.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ class DesktopMediaPicker {
raw_ptr<content::WebContents> web_contents = nullptr;
// The context whose root window is used for dialog placement, cannot be
// null for Aura.
gfx::NativeWindow context = nullptr;
gfx::NativeWindow context = gfx::NativeWindow();
// Parent window the dialog is relative to, only used on Mac.
gfx::NativeWindow parent = nullptr;
gfx::NativeWindow parent = gfx::NativeWindow();
// The modality used for showing the dialog.
ui::ModalType modality = ui::ModalType::MODAL_TYPE_CHILD;
// The name used in the dialog for what is requesting the picker to be
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/printing/print_error_dialog.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void ShowPrintErrorDialogTask(const std::u16string& title,
return;
}

gfx::NativeWindow window = gfx::kNullNativeWindow;
gfx::NativeWindow window = gfx::NativeWindow();
#if !BUILDFLAG(IS_ANDROID)
Browser* browser = chrome::FindLastActive();
if (browser) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/support_tool/screenshot_data_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void ScreenshotDataCollector::OnSourceSelected(const std::string& err,
return;
}
#if BUILDFLAG(IS_CHROMEOS)
gfx::NativeWindow window = nullptr;
gfx::NativeWindow window = gfx::NativeWindow();
switch (id.type) {
case content::DesktopMediaID::Type::TYPE_WEB_CONTENTS: {
window = content::RenderFrameHost::FromID(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ash {

void OpenBrowserDataMigrationErrorDialog(uint64_t required_size) {
chrome::ShowWarningMessageBox(
gfx::kNullNativeWindow, std::u16string(),
gfx::NativeWindow(), std::u16string(),
l10n_util::GetStringFUTF16(
IDS_LACROS_DATA_MIGRATION_OUT_OF_DISK_ERROR_TEXT,
ui::FormatBytes(static_cast<int64_t>(required_size))));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1298,7 +1298,7 @@ IN_PROC_BROWSER_TEST_F(ShelfWebAppBrowserTest, AppIDForPWA) {
chrome::SetAutoAcceptPWAInstallConfirmationForTesting(false);

// Find the native window for the app.
gfx::NativeWindow native_window = nullptr;
gfx::NativeWindow native_window = gfx::NativeWindow();
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->app_controller() &&
browser->app_controller()->app_id() == app_id) {
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ui/ash/shelf/extension_uninstaller.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class ExtensionUninstaller
// window will be used as the anchor.
ExtensionUninstaller(Profile* profile,
const std::string& extension_id,
gfx::NativeWindow parent_window = nullptr);
gfx::NativeWindow parent_window = gfx::NativeWindow());

ExtensionUninstaller(const ExtensionUninstaller&) = delete;
ExtensionUninstaller& operator=(const ExtensionUninstaller&) = delete;
Expand All @@ -40,7 +40,7 @@ class ExtensionUninstaller

raw_ptr<Profile, ExperimentalAsh> profile_;
std::string app_id_;
gfx::NativeWindow parent_window_; // Can be null.
gfx::NativeWindow parent_window_ = gfx::NativeWindow();
std::unique_ptr<extensions::ExtensionUninstallDialog> dialog_;
};

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/browser_navigator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow()
: gfx::kNullNativeWindow;
: gfx::NativeWindow();
const display::Screen* const screen = display::Screen::GetScreen();
const display::Display display =
browser_window ? screen->GetDisplayNearestWindow(native_window)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/extensions/extension_enable_flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class ExtensionEnableFlow : public extensions::LoadErrorReporter::Observer,

// Parent native window for ExtensionInstallPrompt. Note this is mutually
// exclusive with |parent_contents_| above.
gfx::NativeWindow parent_window_ = nullptr;
gfx::NativeWindow parent_window_ = gfx::NativeWindow();

std::unique_ptr<ExtensionInstallPrompt> prompt_;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ IN_PROC_BROWSER_TEST_F(PasswordGenerationPopupViewAxTest, PopupInAxTree) {
"PasswordGenerationPopupViewViews");
controller->Show(GenerationUIState::kOfferGeneration);

gfx::NativeWindow window = gfx::kNullNativeWindow;
gfx::NativeWindow window = gfx::NativeWindow();
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX)
// On Mac and Linux the whole ax tree grows from the main root windows
// and the popup node can be found there. This gives more confidence
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class SharingHubBubbleControllerChromeOsImpl
void DeselectIcon();

views::ViewTracker highlighted_button_tracker_;
gfx::NativeWindow parent_window_ = nullptr;
gfx::NativeWindow parent_window_ = gfx::NativeWindow();
std::unique_ptr<views::NativeWindowTracker> parent_window_tracker_ = nullptr;
bool bubble_showing_ = false;

Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ui/tabs/tab_strip_model_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3166,10 +3166,10 @@ TEST_F(TabStripModelTest, TabBlockedState) {
// DummySingleWebContentsDialogManager doesn't care about the
// dialog window value, so any dummy value works.
DummySingleWebContentsDialogManager* native_manager =
new DummySingleWebContentsDialogManager(gfx::kNullNativeWindow,
new DummySingleWebContentsDialogManager(gfx::NativeWindow(),
modal_dialog_manager);
modal_dialog_manager->ShowDialogWithManager(
gfx::kNullNativeWindow,
gfx::NativeWindow(),
std::unique_ptr<web_modal::SingleWebContentsDialogManager>(
native_manager));
EXPECT_TRUE(strip_src.IsTabBlocked(1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ void EditAddressProfileViewTest::CreateViewAndShow() {
dialog_ = new EditAddressProfileView(mock_controller());
dialog_->ShowForWebContents(test_web_contents_.get());

gfx::NativeView parent = gfx::kNullNativeView;
gfx::NativeView parent = gfx::NativeView();
#if BUILDFLAG(IS_MAC)
// We need a native view parent for the dialog to avoid a DCHECK
// on Mac.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ChooserDialogViewTest : public ChromeViewsTestBase {
controller_->SetBluetoothStatus(
FakeBluetoothChooserController::BluetoothStatus::IDLE);

gfx::NativeView parent = gfx::kNullNativeView;
gfx::NativeView parent = gfx::NativeView();
#if BUILDFLAG(IS_MAC)
// We need a native view parent for the dialog to avoid a DCHECK
// on Mac.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ class MockBrowserViewLayoutDelegate : public BrowserViewLayoutDelegate {
}};
return base::Contains(*supported_features, feature);
}
gfx::NativeView GetHostView() const override { return nullptr; }
gfx::NativeView GetHostView() const override { return gfx::NativeView(); }
bool BrowserIsSystemWebApp() const override { return false; }
bool BrowserIsWebApp() const override { return false; }
bool BrowserIsTypeApp() const override { return false; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ IN_PROC_BROWSER_TEST_P(SelectFileDialogExtensionBrowserTest, FileInputElement) {

IN_PROC_BROWSER_TEST_P(SelectFileDialogExtensionBrowserTest,
OpenDialogWithoutOwningWindow) {
gfx::NativeWindow owning_window = nullptr;
gfx::NativeWindow owning_window = gfx::NativeWindow();

// Open the file dialog with no |owning_window|.
ASSERT_NO_FATAL_FAILURE(OpenDialog(ui::SelectFileDialog::SELECT_OPEN_FILE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ struct ParentPermissionDialogView::Params {
raw_ptr<Profile> profile = nullptr;

// The parent window to this window. This member may be nullptr.
gfx::NativeWindow window = nullptr;
gfx::NativeWindow window = gfx::NativeWindow();

// The callback to call on completion.
ParentPermissionDialog::DoneCallback done_callback;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ IN_PROC_BROWSER_TEST_F(WebAppUninstallDialogViewBrowserTest,

std::unique_ptr<web_app::WebAppUninstallDialog> dialog(
web_app::WebAppUninstallDialog::Create(browser()->profile(),
gfx::kNullNativeWindow));
gfx::NativeWindow()));

base::RunLoop().RunUntilIdle();

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/webid/fake_delegate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "chrome/browser/ui/views/webid/fake_delegate.h"

gfx::NativeView FakeDelegate::GetNativeView() {
return gfx::kNullNativeView;
return gfx::NativeView();
}

content::WebContents* FakeDelegate::GetWebContents() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ void UninstallWebAppWithDialogFromStartupSwitch(const AppId& app_id,
if (provider->registrar_unsafe().CanUserUninstallWebApp(app_id)) {
WebAppUiManagerImpl::Get(provider)->dialog_manager().UninstallWebApp(
app_id, webapps::WebappUninstallSource::kOsSettings,
gfx::kNullNativeWindow,
gfx::NativeWindow(),
base::BindOnce([](std::unique_ptr<ScopedKeepAlive> scoped_keep_alive,
webapps::UninstallResultCode code) {},
std::move(scoped_keep_alive)));
Expand Down

0 comments on commit dad01b0

Please sign in to comment.