Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4800)

Unified Diff: chrome/browser/ui/autofill/chrome_autofill_client.cc

Issue 802833004: Autofill - get rid of one more RenderViewObserver method. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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) {
« no previous file with comments | « chrome/browser/ui/autofill/chrome_autofill_client.h ('k') | components/autofill/content/renderer/autofill_agent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698