Commit e4134557 authored by Kyle Horimoto's avatar Kyle Horimoto Committed by Commit Bot

[CrOS MultiDevice] Clean up MojoWebDialogUI.

In https://chromium-review.googlesource.com/c/chromium/src/+/991497,
calamity@ refactored this class such that it no longer derived from a
template base class.

However, that CL did not actually remove the template type from
MojoWebDialogUI, so this CL finishes that effort up. Additionally, since
the class is no longer a template class, I moved implementations of
functions from the .h file to the .cc file.

Bug: 824568
Change-Id: Ibabd6d4a282069f246821314ec71b4a5ac1c7bd4
Reviewed-on: https://chromium-review.googlesource.com/1138980Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
Commit-Queue: Kyle Horimoto <khorimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#575493}
parent 9fe5d0ab
...@@ -120,4 +120,15 @@ void WebDialogUI::RenderFrameCreated(RenderFrameHost* render_frame_host) { ...@@ -120,4 +120,15 @@ void WebDialogUI::RenderFrameCreated(RenderFrameHost* render_frame_host) {
HandleRenderFrameCreated(render_frame_host); HandleRenderFrameCreated(render_frame_host);
} }
MojoWebDialogUI::MojoWebDialogUI(content::WebUI* web_ui)
: WebDialogUIBase(web_ui), MojoWebUIController(web_ui) {}
MojoWebDialogUI::~MojoWebDialogUI() = default;
void MojoWebDialogUI::RenderFrameCreated(
content::RenderFrameHost* render_frame_host) {
content::WebUIController::RenderFrameCreated(render_frame_host);
HandleRenderFrameCreated(render_frame_host);
}
} // namespace ui } // namespace ui
...@@ -83,23 +83,17 @@ class WEB_DIALOGS_EXPORT WebDialogUI : public WebDialogUIBase, ...@@ -83,23 +83,17 @@ class WEB_DIALOGS_EXPORT WebDialogUI : public WebDialogUIBase,
// Displays file URL contents inside a modal web dialog while also enabling // Displays file URL contents inside a modal web dialog while also enabling
// Mojo calls to be made from within the dialog. // Mojo calls to be made from within the dialog.
template <typename Interface>
class WEB_DIALOGS_EXPORT MojoWebDialogUI : public WebDialogUIBase, class WEB_DIALOGS_EXPORT MojoWebDialogUI : public WebDialogUIBase,
public MojoWebUIController { public MojoWebUIController {
public: public:
// When created, the delegate should already be set as user data on the // When created, the delegate should already be set as user data on the
// WebContents. // WebContents.
explicit MojoWebDialogUI(content::WebUI* web_ui) explicit MojoWebDialogUI(content::WebUI* web_ui);
: WebDialogUIBase(web_ui), MojoWebUIController(web_ui) {} ~MojoWebDialogUI() override;
~MojoWebDialogUI() override {}
private: private:
// content::WebUIController: // content::WebUIController:
void RenderFrameCreated( void RenderFrameCreated(content::RenderFrameHost* render_frame_host) override;
content::RenderFrameHost* render_frame_host) override {
content::WebUIController::RenderFrameCreated(render_frame_host);
HandleRenderFrameCreated(render_frame_host);
}
DISALLOW_COPY_AND_ASSIGN(MojoWebDialogUI); DISALLOW_COPY_AND_ASSIGN(MojoWebDialogUI);
}; };
......
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