Move AutofillPopup from NativeWindow to WebContents (#12514)
This commit is contained in:
parent
3a45d541f3
commit
c75dd93b92
11 changed files with 123 additions and 126 deletions
|
@ -27,6 +27,26 @@ void CommonWebContentsDelegate::HandleKeyboardEvent(
|
|||
owner_window()->HandleKeyboardEvent(source, event);
|
||||
}
|
||||
|
||||
void CommonWebContentsDelegate::ShowAutofillPopup(
|
||||
bool offscreen,
|
||||
content::RenderFrameHost* frame_host,
|
||||
const gfx::RectF& bounds,
|
||||
const std::vector<base::string16>& values,
|
||||
const std::vector<base::string16>& labels) {
|
||||
if (!owner_window())
|
||||
return;
|
||||
|
||||
auto* window = static_cast<NativeWindowViews*>(owner_window());
|
||||
autofill_popup_->CreateView(
|
||||
frame_host, offscreen, window->web_view(), bounds);
|
||||
autofill_popup_->SetItems(values, labels);
|
||||
}
|
||||
|
||||
void CommonWebContentsDelegate::HideAutofillPopup() {
|
||||
if (autofill_popup_)
|
||||
autofill_popup_->Hide();
|
||||
}
|
||||
|
||||
gfx::ImageSkia CommonWebContentsDelegate::GetDevToolsWindowIcon() {
|
||||
if (!owner_window())
|
||||
return gfx::ImageSkia();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue