Chromium Code Reviews| Index: chrome/browser/ui/autofill/chrome_autofill_client.cc |
| diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.cc b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| index 37c8c48ec95f0cb0bda949838cf64c5b8f4254a0..215f891180d396be34ed0747fc0dac2d25267eb0 100644 |
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| @@ -30,6 +30,7 @@ |
| #include "components/autofill/core/common/autofill_pref_names.h" |
| #include "components/password_manager/content/browser/content_password_manager_driver.h" |
| #include "content/public/browser/render_frame_host.h" |
| +#include "extensions/browser/guest_view/web_view/web_view_guest.h" |
| #include "ui/gfx/geometry/rect.h" |
| #if defined(OS_ANDROID) |
| @@ -185,12 +186,20 @@ void ChromeAutofillClient::ShowAutofillPopup( |
| gfx::RectF element_bounds_in_screen_space = |
| element_bounds + client_area.OffsetFromOrigin(); |
| + // If the webcontents is inside a webview, use the embedder's native view, |
|
lazyboy
2015/02/05 00:39:50
s/webcontents/WebContents
s/webview/<webview>
noms (inactive)
2015/02/05 02:50:33
Done.
|
| + // since the webview does not have its own native view. |
| + gfx::NativeView container_view; |
| + if (extensions::WebViewGuest::FromWebContents(web_contents())) |
|
lazyboy
2015/02/05 00:43:56
#if defined(ENABLE_EXTENSIONS) this call and the h
noms (inactive)
2015/02/05 02:50:33
Yup, just noticed that. Done.
|
| + container_view = web_contents()->GetContentNativeView(); |
| + else |
| + container_view = web_contents()->GetNativeView(); |
| + |
| // Will delete or reuse the old |popup_controller_|. |
| popup_controller_ = |
| AutofillPopupControllerImpl::GetOrCreate(popup_controller_, |
| delegate, |
| web_contents(), |
| - web_contents()->GetNativeView(), |
| + container_view, |
| element_bounds_in_screen_space, |
| text_direction); |