Commit 38512b7a authored by Nasko Oskov's avatar Nasko Oskov Committed by Commit Bot

Remove unused RenderViewHost parameter in OnDialogShown.

Bug: 763548, 1002276
Change-Id: I31ce542d39baee996359ba179759ac00239744c1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1904448
Commit-Queue: Scott Violet <sky@chromium.org>
Auto-Submit: Nasko Oskov <nasko@chromium.org>
Reviewed-by: default avatarScott Violet <sky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713681}
parent 3a7be233
......@@ -114,8 +114,7 @@ WebContents* LoginWebDialog::GetCurrentWebContents() {
return stack.empty() ? nullptr : stack.front();
}
void LoginWebDialog::OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void LoginWebDialog::OnDialogShown(content::WebUI* webui) {
g_web_contents_stack.Pointer()->push_front(webui->GetWebContents());
}
......
......@@ -66,8 +66,7 @@ class LoginWebDialog : public ui::WebDialogDelegate {
void GetDialogSize(gfx::Size* size) const override;
void GetMinimumDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
// NOTE: This function deletes this object at the end.
void OnDialogClosed(const std::string& json_retval) override;
void OnCloseContents(content::WebContents* source,
......
......@@ -278,9 +278,7 @@ std::string CertificateViewerDialog::GetDialogArgs() const {
return data;
}
void CertificateViewerDialog::OnDialogShown(
content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void CertificateViewerDialog::OnDialogShown(content::WebUI* webui) {
webui_ = webui;
}
......
......@@ -54,8 +54,7 @@ class CertificateViewerDialog : public ui::WebDialogDelegate {
std::vector<content::WebUIMessageHandler*>* handlers) const override;
void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
void OnDialogClosed(const std::string& json_retval) override;
void OnCloseContents(content::WebContents* source,
bool* out_close_dialog) override;
......
......@@ -207,9 +207,7 @@ std::string AssistantOptInDialog::GetDialogArgs() const {
return std::string();
}
void AssistantOptInDialog::OnDialogShown(
content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void AssistantOptInDialog::OnDialogShown(content::WebUI* webui) {
assistant_ui_ = static_cast<AssistantOptInUI*>(webui->GetController());
}
......
......@@ -63,8 +63,7 @@ class AssistantOptInDialog : public SystemWebDialogDelegate {
// ui::WebDialogDelegate
void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
void OnDialogClosed(const std::string& json_retval) override;
private:
......
......@@ -70,11 +70,9 @@ bool CrostiniInstallerDialog::CanCloseDialog() const {
return installer_ui_ == nullptr || installer_ui_->can_close();
}
void CrostiniInstallerDialog::OnDialogShown(
content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void CrostiniInstallerDialog::OnDialogShown(content::WebUI* webui) {
installer_ui_ = static_cast<CrostiniInstallerUI*>(webui->GetController());
return SystemWebDialogDelegate::OnDialogShown(webui, render_view_host);
return SystemWebDialogDelegate::OnDialogShown(webui);
}
void CrostiniInstallerDialog::OnCloseContents(content::WebContents* source,
......
......@@ -26,8 +26,7 @@ class CrostiniInstallerDialog : public SystemWebDialogDelegate {
bool ShouldShowCloseButton() const override;
void AdjustWidgetInitParams(views::Widget::InitParams* params) override;
bool CanCloseDialog() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
void OnCloseContents(content::WebContents* source,
bool* out_close_dialog) override;
......
......@@ -123,9 +123,7 @@ std::string SystemWebDialogDelegate::GetDialogArgs() const {
return std::string();
}
void SystemWebDialogDelegate::OnDialogShown(
content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void SystemWebDialogDelegate::OnDialogShown(content::WebUI* webui) {
webui_ = webui;
if (features::IsSplitSettingsEnabled()) {
......
......@@ -61,8 +61,7 @@ class SystemWebDialogDelegate : public ui::WebDialogDelegate {
void GetDialogSize(gfx::Size* size) const override;
bool CanResizeDialog() const override;
std::string GetDialogArgs() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
// Note: deletes |this|.
void OnDialogClosed(const std::string& json_retval) override;
void OnCloseContents(content::WebContents* source,
......
......@@ -15,7 +15,6 @@
#include "base/values.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_message_handler.h"
......@@ -28,7 +27,6 @@
#endif
using content::RenderFrameHost;
using content::RenderViewHost;
using content::WebContents;
using content::WebUIMessageHandler;
......@@ -85,8 +83,7 @@ void ConstrainedWebDialogUI::RenderFrameCreated(
web_ui()->AddMessageHandler(base::WrapUnique(handler));
}
dialog_delegate->OnDialogShown(web_ui(),
render_frame_host->GetRenderViewHost());
dialog_delegate->OnDialogShown(web_ui());
}
void ConstrainedWebDialogUI::OnDialogCloseMessage(const base::ListValue* args) {
......
......@@ -128,10 +128,8 @@ bool InlineLoginHandlerDialogChromeOS::ShouldShowDialogTitle() const {
return false;
}
void InlineLoginHandlerDialogChromeOS::OnDialogShown(
content::WebUI* webui,
content::RenderViewHost* render_view_host) {
SystemWebDialogDelegate::OnDialogShown(webui, render_view_host);
void InlineLoginHandlerDialogChromeOS::OnDialogShown(content::WebUI* webui) {
SystemWebDialogDelegate::OnDialogShown(webui);
web_modal::WebContentsModalDialogManager::CreateForWebContents(
webui->GetWebContents());
web_modal::WebContentsModalDialogManager::FromWebContents(
......
......@@ -46,8 +46,7 @@ class InlineLoginHandlerDialogChromeOS
void GetDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
bool ShouldShowDialogTitle() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
private:
InlineLoginHandlerModalDelegate delegate_;
......
......@@ -268,10 +268,9 @@ std::string WebDialogView::GetDialogArgs() const {
return std::string();
}
void WebDialogView::OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) {
void WebDialogView::OnDialogShown(content::WebUI* webui) {
if (delegate_)
delegate_->OnDialogShown(webui, render_view_host);
delegate_->OnDialogShown(webui);
}
void WebDialogView::OnDialogClosed(const std::string& json_retval) {
......
......@@ -114,8 +114,7 @@ class WEBVIEW_EXPORT WebDialogView : public views::ClientView,
void GetDialogSize(gfx::Size* size) const override;
void GetMinimumDialogSize(gfx::Size* size) const override;
std::string GetDialogArgs() const override;
void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) override;
void OnDialogShown(content::WebUI* webui) override;
void OnDialogClosed(const std::string& json_retval) override;
void OnDialogCloseFromWebUI(const std::string& json_retval) override;
void OnCloseContents(content::WebContents* source,
......
......@@ -19,7 +19,6 @@ class GURL;
namespace content {
class RenderFrameHost;
class RenderViewHost;
class WebContents;
class WebUI;
class WebUIMessageHandler;
......@@ -88,9 +87,7 @@ class WEB_DIALOGS_EXPORT WebDialogDelegate {
// A callback to notify the delegate that a web dialog has been shown.
// |webui| is the WebUI with which the dialog is associated.
// |render_view_host| is the RenderViewHost for the shown dialog.
virtual void OnDialogShown(content::WebUI* webui,
content::RenderViewHost* render_view_host) {}
virtual void OnDialogShown(content::WebUI* webui) {}
// A callback to notify the delegate that the window is requesting to be
// closed. If this returns true, the dialog is closed, otherwise the
......
......@@ -10,7 +10,6 @@
#include "base/memory/ptr_util.h"
#include "base/values.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui.h"
#include "content/public/browser/web_ui_message_handler.h"
......@@ -95,7 +94,7 @@ void WebDialogUIBase::HandleRenderFrameCreated(
web_ui_->AddMessageHandler(base::WrapUnique(handler));
if (delegate)
delegate->OnDialogShown(web_ui_, render_frame_host->GetRenderViewHost());
delegate->OnDialogShown(web_ui_);
}
void WebDialogUIBase::OnDialogClosed(const base::ListValue* args) {
......
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