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