Commit 549dfb1d authored by Elly Fong-Jones's avatar Elly Fong-Jones Committed by Chromium LUCI CQ

cbuiv: remove CollectedCookiesViews overrides

Bug: 1075649
Change-Id: Ia308f0fdd33e274921b1519c5f1aa539da775360
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2627777Reviewed-by: default avatarCaroline Rising <corising@chromium.org>
Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844194}
parent 2197aac0
...@@ -272,30 +272,6 @@ void CollectedCookiesViews::CreateAndShowForWebContents( ...@@ -272,30 +272,6 @@ void CollectedCookiesViews::CreateAndShowForWebContents(
dialog_manager->FocusTopmostDialog(); dialog_manager->FocusTopmostDialog();
} }
///////////////////////////////////////////////////////////////////////////////
// CollectedCookiesViews, views::DialogDelegate implementation:
base::string16 CollectedCookiesViews::GetWindowTitle() const {
return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_DIALOG_TITLE);
}
ui::ModalType CollectedCookiesViews::GetModalType() const {
return ui::MODAL_TYPE_CHILD;
}
bool CollectedCookiesViews::ShouldShowCloseButton() const {
return false;
}
void CollectedCookiesViews::DeleteDelegate() {
if (!destroying_) {
// The associated Widget is being destroyed before the owning WebContents.
// Tell the owner to delete |this|.
destroying_ = true;
web_contents_->RemoveUserData(UserDataKey());
}
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// CollectedCookiesViews, views::TabbedPaneListener implementation: // CollectedCookiesViews, views::TabbedPaneListener implementation:
...@@ -331,6 +307,9 @@ CollectedCookiesViews::CollectedCookiesViews(content::WebContents* web_contents) ...@@ -331,6 +307,9 @@ CollectedCookiesViews::CollectedCookiesViews(content::WebContents* web_contents)
: web_contents_(web_contents) { : web_contents_(web_contents) {
SetButtons(ui::DIALOG_BUTTON_OK); SetButtons(ui::DIALOG_BUTTON_OK);
SetButtonLabel(ui::DIALOG_BUTTON_OK, l10n_util::GetStringUTF16(IDS_DONE)); SetButtonLabel(ui::DIALOG_BUTTON_OK, l10n_util::GetStringUTF16(IDS_DONE));
SetModalType(ui::MODAL_TYPE_CHILD);
SetShowCloseButton(false);
SetTitle(IDS_COLLECTED_COOKIES_DIALOG_TITLE);
views::GridLayout* layout = views::GridLayout* layout =
SetLayoutManager(std::make_unique<views::GridLayout>()); SetLayoutManager(std::make_unique<views::GridLayout>());
ChromeLayoutProvider* provider = ChromeLayoutProvider::Get(); ChromeLayoutProvider* provider = ChromeLayoutProvider::Get();
...@@ -400,6 +379,15 @@ void CollectedCookiesViews::OnDialogClosed() { ...@@ -400,6 +379,15 @@ void CollectedCookiesViews::OnDialogClosed() {
} }
} }
void CollectedCookiesViews::DeleteDelegate() {
if (!destroying_) {
// The associated Widget is being destroyed before the owning WebContents.
// Tell the owner to delete |this|.
destroying_ = true;
web_contents_->RemoveUserData(UserDataKey());
}
}
std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() { std::unique_ptr<views::View> CollectedCookiesViews::CreateAllowedPane() {
// This captures a snapshot of the allowed cookies of the current page so we // This captures a snapshot of the allowed cookies of the current page so we
// are fine using WebContents::GetMainFrame() here // are fine using WebContents::GetMainFrame() here
......
...@@ -47,12 +47,6 @@ class CollectedCookiesViews ...@@ -47,12 +47,6 @@ class CollectedCookiesViews
// Use BrowserWindow::ShowCollectedCookiesDialog to show. // Use BrowserWindow::ShowCollectedCookiesDialog to show.
static void CreateAndShowForWebContents(content::WebContents* web_contents); static void CreateAndShowForWebContents(content::WebContents* web_contents);
// views::DialogDelegate:
base::string16 GetWindowTitle() const override;
ui::ModalType GetModalType() const override;
bool ShouldShowCloseButton() const override;
void DeleteDelegate() override;
// views::TabbedPaneListener: // views::TabbedPaneListener:
void TabSelectedAt(int index) override; void TabSelectedAt(int index) override;
...@@ -70,6 +64,9 @@ class CollectedCookiesViews ...@@ -70,6 +64,9 @@ class CollectedCookiesViews
void OnDialogClosed(); void OnDialogClosed();
// DialogDelegateView:
void DeleteDelegate() override;
std::unique_ptr<views::View> CreateAllowedPane(); std::unique_ptr<views::View> CreateAllowedPane();
std::unique_ptr<views::View> CreateBlockedPane(); std::unique_ptr<views::View> CreateBlockedPane();
......
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