refactor: mojofy autofill renderer->browser (#18760)

* re-implement renderer->browser calls with mojo

* lint

* fix: clean up after rebase

* lint

* fix: lazy load autofill drivers
This commit is contained in:
Heilig Benedek 2019-08-19 22:13:24 +02:00 committed by Shelley Vohr
parent 43e6d7fe88
commit b33558d822
14 changed files with 329 additions and 98 deletions

View file

@ -214,7 +214,6 @@ void CommonWebContentsDelegate::SetOwnerWindow(
NativeWindow* owner_window) {
if (owner_window) {
owner_window_ = owner_window->GetWeakPtr();
autofill_popup_.reset(new AutofillPopup());
NativeWindowRelay::CreateForWebContents(web_contents,
owner_window->GetWeakPtr());
} else {
@ -637,24 +636,4 @@ void CommonWebContentsDelegate::SetHtmlApiFullscreen(bool enter_fullscreen) {
native_fullscreen_ = false;
}
void CommonWebContentsDelegate::ShowAutofillPopup(
content::RenderFrameHost* frame_host,
content::RenderFrameHost* embedder_frame_host,
bool offscreen,
const gfx::RectF& bounds,
const std::vector<base::string16>& values,
const std::vector<base::string16>& labels) {
if (!owner_window())
return;
autofill_popup_->CreateView(frame_host, embedder_frame_host, offscreen,
owner_window()->content_view(), bounds);
autofill_popup_->SetItems(values, labels);
}
void CommonWebContentsDelegate::HideAutofillPopup() {
if (autofill_popup_)
autofill_popup_->Hide();
}
} // namespace electron