Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[site data] Create PageSpecificSiteDataDialog
When the feature is enabled, show PageSpecificSiteDataDialog instead of CollectedCookiesView. PageSpecificSiteDataDialog is empty for now. After showing the web modal, the widget ref is needed to store is as the user data for the current web contents. Update contrained_window API to return the widget. Bug: 1344787 Change-Id: I8afb136c3c3227d1301090db1c4af85194023afc Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3805330 Commit-Queue: Olesia Marukhno <olesiamarukhno@google.com> Reviewed-by: Theodore Olsauskas-Warren <sauski@google.com> Reviewed-by: Peter Boström <pbos@chromium.org> Cr-Commit-Position: refs/heads/main@{#1031430}
- Loading branch information
Olesia Marukhno
authored and
Chromium LUCI CQ
committed
Aug 4, 2022
1 parent
5c605dd
commit 998ff19
Showing
7 changed files
with
75 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
olesiamarukhno@google.com | ||
sauski@google.com |
21 changes: 21 additions & 0 deletions
21
chrome/browser/ui/views/site_data/page_specific_site_data_dialog.cc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Copyright 2022 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/site_data/page_specific_site_data_dialog.h" | ||
|
||
#include "chrome/grit/generated_resources.h" | ||
#include "components/constrained_window/constrained_window_views.h" | ||
#include "ui/base/l10n/l10n_util.h" | ||
#include "ui/base/models/dialog_model.h" | ||
|
||
// static | ||
views::Widget* ShowPageSpecificSiteDataDialog( | ||
content::WebContents* web_contents) { | ||
auto builder = ui::DialogModel::Builder(); | ||
builder.SetTitle( | ||
l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE)); | ||
// TODO(crbug.com/1344787): Build the rest of the dialog. Add action handling. | ||
// Remove the dialog from WebContentsUserData when destroyed. | ||
return constrained_window::ShowWebModal(builder.Build(), web_contents); | ||
} |
19 changes: 19 additions & 0 deletions
19
chrome/browser/ui/views/site_data/page_specific_site_data_dialog.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022 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_SITE_DATA_PAGE_SPECIFIC_SITE_DATA_DIALOG_H_ | ||
#define CHROME_BROWSER_UI_VIEWS_SITE_DATA_PAGE_SPECIFIC_SITE_DATA_DIALOG_H_ | ||
|
||
namespace views { | ||
class Widget; | ||
} // namespace views | ||
|
||
namespace content { | ||
class WebContents; | ||
} // namespace content | ||
|
||
views::Widget* ShowPageSpecificSiteDataDialog( | ||
content::WebContents* web_contents); | ||
|
||
#endif // CHROME_BROWSER_UI_VIEWS_SITE_DATA_PAGE_SPECIFIC_SITE_DATA_DIALOG_H_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters