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 d848917132c9be6350cbc02e862f67818941a729..c3d985a994d60bfff8950e15cdf29f785ba2d38e 100644 |
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc |
| @@ -37,6 +37,11 @@ namespace autofill { |
| ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents) |
| : content::WebContentsObserver(web_contents), web_contents_(web_contents) { |
| DCHECK(web_contents); |
| + ZoomController* zoom_controller = |
| + ZoomController::FromWebContents(web_contents); |
| + // No ZoomControllers on Android. |
| + if (zoom_controller) |
| + zoom_controller->AddObserver(this); |
| #if defined(OS_MACOSX) && !defined(OS_IOS) |
| RegisterForKeystoneNotifications(); |
| #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| @@ -172,6 +177,14 @@ void ChromeAutofillClient::WebContentsDestroyed() { |
| HideAutofillPopup(); |
| } |
| +void ChromeAutofillClient::OnZoomChanged( |
| + const ZoomController::ZoomChangedEventData& data) { |
| + // TODO(wjmaclean) Decide if we want to hide the popup for any zoom event, not |
| + // just zoom events for web_contents_. |
|
Ilya Sherman
2014/07/09 21:52:43
What other zoom events are possible?
wjmaclean
2014/07/10 14:47:35
ZoomObservers are notified of the following:
1) ch
|
| + if (data.web_contents == web_contents_) |
| + HideAutofillPopup(); |
| +} |
| + |
| void ChromeAutofillClient::DetectAccountCreationForms( |
| const std::vector<autofill::FormStructure*>& forms) { |
| password_manager::PasswordGenerationManager* manager = |