| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
| 6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 6 #define CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| 11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
| 12 #include "components/autofill/core/browser/autofill_client.h" | 12 #include "components/autofill/core/browser/autofill_client.h" |
| 13 #include "content/public/browser/web_contents_observer.h" | 13 #include "content/public/browser/web_contents_observer.h" |
| 14 #include "content/public/browser/web_contents_user_data.h" | 14 #include "content/public/browser/web_contents_user_data.h" |
| 15 | 15 |
| 16 namespace content { | 16 namespace content { |
| 17 struct FrameNavigateParams; | 17 struct FrameNavigateParams; |
| 18 struct LoadCommittedDetails; | 18 struct LoadCommittedDetails; |
| 19 class WebContents; | 19 class WebContents; |
| 20 } | 20 } |
| 21 | 21 |
| 22 namespace autofill { | 22 namespace autofill { |
| 23 | 23 |
| 24 class AutofillDialogController; | 24 class AutofillDialogController; |
| 25 class AutofillKeystoneBridgeWrapper; |
| 25 class AutofillPopupControllerImpl; | 26 class AutofillPopupControllerImpl; |
| 26 struct FormData; | 27 struct FormData; |
| 27 | 28 |
| 28 // Chrome implementation of AutofillClient. | 29 // Chrome implementation of AutofillClient. |
| 29 class ChromeAutofillClient | 30 class ChromeAutofillClient |
| 30 : public AutofillClient, | 31 : public AutofillClient, |
| 31 public content::WebContentsUserData<ChromeAutofillClient>, | 32 public content::WebContentsUserData<ChromeAutofillClient>, |
| 32 public content::WebContentsObserver { | 33 public content::WebContentsObserver { |
| 33 public: | 34 public: |
| 34 virtual ~ChromeAutofillClient(); | 35 virtual ~ChromeAutofillClient(); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 78 } |
| 78 void SetDialogControllerForTesting( | 79 void SetDialogControllerForTesting( |
| 79 const base::WeakPtr<AutofillDialogController>& dialog_controller) { | 80 const base::WeakPtr<AutofillDialogController>& dialog_controller) { |
| 80 dialog_controller_ = dialog_controller; | 81 dialog_controller_ = dialog_controller; |
| 81 } | 82 } |
| 82 | 83 |
| 83 private: | 84 private: |
| 84 explicit ChromeAutofillClient(content::WebContents* web_contents); | 85 explicit ChromeAutofillClient(content::WebContents* web_contents); |
| 85 friend class content::WebContentsUserData<ChromeAutofillClient>; | 86 friend class content::WebContentsUserData<ChromeAutofillClient>; |
| 86 | 87 |
| 88 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 89 // (Comment goes here...) |
| 90 void RegisterForKeystoneNotifications(); |
| 91 void UnregisterFromKeystoneNotifications(); |
| 92 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 93 |
| 87 content::WebContents* const web_contents_; | 94 content::WebContents* const web_contents_; |
| 88 base::WeakPtr<AutofillDialogController> dialog_controller_; | 95 base::WeakPtr<AutofillDialogController> dialog_controller_; |
| 89 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; | 96 base::WeakPtr<AutofillPopupControllerImpl> popup_controller_; |
| 90 | 97 |
| 98 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 99 // (Comment goes here...) |
| 100 AutofillKeystoneBridgeWrapper* bridge_; |
| 101 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 102 |
| 91 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); | 103 DISALLOW_COPY_AND_ASSIGN(ChromeAutofillClient); |
| 92 }; | 104 }; |
| 93 | 105 |
| 94 } // namespace autofill | 106 } // namespace autofill |
| 95 | 107 |
| 96 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ | 108 #endif // CHROME_BROWSER_UI_AUTOFILL_CHROME_AUTOFILL_CLIENT_H_ |
| OLD | NEW |