| 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 98199e4d379fb8ebdcfaf0913a2137614e3faf8a..6a9181c1ca5c9fef1de41e88891578ff13091c21 100644
|
| --- a/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| +++ b/chrome/browser/ui/autofill/chrome_autofill_client.cc
|
| @@ -41,7 +41,9 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(autofill::ChromeAutofillClient);
|
| namespace autofill {
|
|
|
| ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
|
| - : content::WebContentsObserver(web_contents), weak_pointer_factory_(this) {
|
| + : content::WebContentsObserver(web_contents),
|
| + weak_pointer_factory_(this),
|
| + screen_observer_(this) {
|
| DCHECK(web_contents);
|
|
|
| #if !defined(OS_ANDROID)
|
| @@ -60,6 +62,9 @@ ChromeAutofillClient::ChromeAutofillClient(content::WebContents* web_contents)
|
| #if defined(OS_MACOSX) && !defined(OS_IOS)
|
| RegisterForKeystoneNotifications();
|
| #endif // defined(OS_MACOSX) && !defined(OS_IOS)
|
| +
|
| + screen_observer_.Add(
|
| + gfx::Screen::GetScreenFor(web_contents->GetNativeView()));
|
| }
|
|
|
| ChromeAutofillClient::~ChromeAutofillClient() {
|
| @@ -213,6 +218,18 @@ void ChromeAutofillClient::OnZoomChanged(
|
| HideAutofillPopup();
|
| }
|
|
|
| +void ChromeAutofillClient::OnDisplayAdded(const gfx::Display& new_display) {
|
| +}
|
| +
|
| +void ChromeAutofillClient::OnDisplayRemoved(const gfx::Display& old_display) {
|
| +}
|
| +
|
| +void ChromeAutofillClient::OnDisplayMetricsChanged(const gfx::Display& display,
|
| + uint32_t metrics) {
|
| + if (metrics | DisplayObserver::DISPLAY_METRIC_ROTATION)
|
| + HideAutofillPopup();
|
| +}
|
| +
|
| void ChromeAutofillClient::DetectAccountCreationForms(
|
| content::RenderFrameHost* rfh,
|
| const std::vector<autofill::FormStructure*>& forms) {
|
|
|