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

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

Issue 334653006: mac: Prevent Address Book permissions dialog from erroneously appearing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add metrics. Note the addition of histograms.xml Created 6 years, 6 months 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.h
diff --git a/chrome/browser/ui/autofill/chrome_autofill_client.h b/chrome/browser/ui/autofill/chrome_autofill_client.h
index 57a19de4aef4d6b53afd3b5bb42735c555df6272..9776271f90eab47eee66bd30e89640659a08c98b 100644
--- a/chrome/browser/ui/autofill/chrome_autofill_client.h
+++ b/chrome/browser/ui/autofill/chrome_autofill_client.h
@@ -13,6 +13,10 @@
#include "content/public/browser/web_contents_observer.h"
#include "content/public/browser/web_contents_user_data.h"
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include "chrome/browser/autofill/autofill_keystone_observer_mac_delegate.h"
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
namespace content {
struct FrameNavigateParams;
struct LoadCommittedDetails;
@@ -22,12 +26,16 @@ class WebContents;
namespace autofill {
class AutofillDialogController;
+class AutofillKeystoneObserverMac;
class AutofillPopupControllerImpl;
struct FormData;
// Chrome implementation of AutofillClient.
class ChromeAutofillClient
: public AutofillClient,
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ public AutofillKeystoneObserverMacDelegate,
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
public content::WebContentsUserData<ChromeAutofillClient>,
public content::WebContentsObserver {
public:
@@ -68,6 +76,12 @@ class ChromeAutofillClient
const base::string16& autofilled_value,
const base::string16& profile_full_name) OVERRIDE;
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ // AutofillKeystoneObserverMacDelegate:
+ virtual void OnKeystoneNotification(
+ keystone_glue::AutoupdateStatus status) OVERRIDE;
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
// content::WebContentsObserver implementation.
virtual void WebContentsDestroyed() OVERRIDE;
@@ -81,6 +95,11 @@ class ChromeAutofillClient
}
private:
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ void AddKeystoneObserver();
+ void RemoveKeystoneObserver();
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
explicit ChromeAutofillClient(content::WebContents* web_contents);
friend class content::WebContentsUserData<ChromeAutofillClient>;
@@ -88,6 +107,14 @@ class ChromeAutofillClient
base::WeakPtr<AutofillDialogController> dialog_controller_;
base::WeakPtr<AutofillPopupControllerImpl> popup_controller_;
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+ // The class of this property must remain a forward declaration, even in the
+ // .cc implementation file, since the header file for the class requires
+ // ObjC++ to compile. This means that the pointer cannot be wrapped in a
+ // scoped_ptr.
+ AutofillKeystoneObserverMac* keystone_observer_;
+#endif // defined(OS_MACOSX) && !defined(OS_IOS)
+
DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient);
};

Powered by Google App Engine
This is Rietveld 408576698