OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 5 #ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 6 #define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 class AutofillExternalDelegate | 28 class AutofillExternalDelegate |
29 : public AutofillPopupDelegate { | 29 : public AutofillPopupDelegate { |
30 public: | 30 public: |
31 // Creates an AutofillExternalDelegate for the specified AutofillManager and | 31 // Creates an AutofillExternalDelegate for the specified AutofillManager and |
32 // AutofillDriver. | 32 // AutofillDriver. |
33 AutofillExternalDelegate(AutofillManager* manager, | 33 AutofillExternalDelegate(AutofillManager* manager, |
34 AutofillDriver* driver); | 34 AutofillDriver* driver); |
35 virtual ~AutofillExternalDelegate(); | 35 virtual ~AutofillExternalDelegate(); |
36 | 36 |
37 // AutofillPopupDelegate implementation. | 37 // AutofillPopupDelegate implementation. |
38 virtual void OnPopupShown() override; | 38 void OnPopupShown() override; |
39 virtual void OnPopupHidden() override; | 39 void OnPopupHidden() override; |
40 virtual void DidSelectSuggestion(const base::string16& value, | 40 void DidSelectSuggestion(const base::string16& value, |
41 int identifier) override; | 41 int identifier) override; |
42 virtual void DidAcceptSuggestion(const base::string16& value, | 42 void DidAcceptSuggestion(const base::string16& value, |
43 int identifier) override; | 43 int identifier) override; |
44 virtual void RemoveSuggestion(const base::string16& value, | 44 void RemoveSuggestion(const base::string16& value, int identifier) override; |
45 int identifier) override; | 45 void ClearPreviewedForm() override; |
46 virtual void ClearPreviewedForm() override; | |
47 | 46 |
48 // Records and associates a query_id with web form data. Called | 47 // Records and associates a query_id with web form data. Called |
49 // when the renderer posts an Autofill query to the browser. |bounds| | 48 // when the renderer posts an Autofill query to the browser. |bounds| |
50 // is window relative. |display_warning_if_disabled| tells us if we should | 49 // is window relative. |display_warning_if_disabled| tells us if we should |
51 // display warnings (such as autofill is disabled, but had suggestions). | 50 // display warnings (such as autofill is disabled, but had suggestions). |
52 // We might not want to display the warning if a website has disabled | 51 // We might not want to display the warning if a website has disabled |
53 // Autocomplete because they have their own popup, and showing our popup | 52 // Autocomplete because they have their own popup, and showing our popup |
54 // on to of theirs would be a poor user experience. | 53 // on to of theirs would be a poor user experience. |
55 virtual void OnQuery(int query_id, | 54 virtual void OnQuery(int query_id, |
56 const FormData& form, | 55 const FormData& form, |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 bool has_shown_address_book_prompt; | 154 bool has_shown_address_book_prompt; |
156 | 155 |
157 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; | 156 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; |
158 | 157 |
159 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 158 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
160 }; | 159 }; |
161 | 160 |
162 } // namespace autofill | 161 } // namespace autofill |
163 | 162 |
164 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 163 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
OLD | NEW |