| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 const std::vector<base::string16>& data_list_labels); | 73 const std::vector<base::string16>& data_list_labels); |
| 74 | 74 |
| 75 // Inform the delegate that the text field editing has ended. This is | 75 // Inform the delegate that the text field editing has ended. This is |
| 76 // used to help record the metrics of when a new popup is shown. | 76 // used to help record the metrics of when a new popup is shown. |
| 77 void DidEndTextFieldEditing(); | 77 void DidEndTextFieldEditing(); |
| 78 | 78 |
| 79 // Returns the delegate to its starting state by removing any page specific | 79 // Returns the delegate to its starting state by removing any page specific |
| 80 // values or settings. | 80 // values or settings. |
| 81 void Reset(); | 81 void Reset(); |
| 82 | 82 |
| 83 // The renderer sent an IPC acknowledging an earlier ping IPC. |
| 84 void OnPingAck(); |
| 85 |
| 83 protected: | 86 protected: |
| 84 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr(); | 87 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr(); |
| 85 | 88 |
| 86 private: | 89 private: |
| 87 // Fills the form with the Autofill data corresponding to |unique_id|. | 90 // Fills the form with the Autofill data corresponding to |unique_id|. |
| 88 // If |is_preview| is true then this is just a preview to show the user what | 91 // If |is_preview| is true then this is just a preview to show the user what |
| 89 // would be selected and if |is_preview| is false then the user has selected | 92 // would be selected and if |is_preview| is false then the user has selected |
| 90 // this data. | 93 // this data. |
| 91 void FillAutofillFormData(int unique_id, bool is_preview); | 94 void FillAutofillFormData(int unique_id, bool is_preview); |
| 92 | 95 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 104 std::vector<base::string16>* icons, | 107 std::vector<base::string16>* icons, |
| 105 std::vector<int>* unique_ids); | 108 std::vector<int>* unique_ids); |
| 106 | 109 |
| 107 // Insert the data list values at the start of the given list, including | 110 // Insert the data list values at the start of the given list, including |
| 108 // any required separators. | 111 // any required separators. |
| 109 void InsertDataListValues(std::vector<base::string16>* values, | 112 void InsertDataListValues(std::vector<base::string16>* values, |
| 110 std::vector<base::string16>* labels, | 113 std::vector<base::string16>* labels, |
| 111 std::vector<base::string16>* icons, | 114 std::vector<base::string16>* icons, |
| 112 std::vector<int>* unique_ids); | 115 std::vector<int>* unique_ids); |
| 113 | 116 |
| 117 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 118 // Pings the renderer. |
| 119 void PingRenderer(); |
| 120 #endif // defined(OS_MACOSX) && !defined(OS_IOS) |
| 121 |
| 114 AutofillManager* manager_; // weak. | 122 AutofillManager* manager_; // weak. |
| 115 | 123 |
| 116 // Provides driver-level context to the shared code of the component. Must | 124 // Provides driver-level context to the shared code of the component. Must |
| 117 // outlive this object. | 125 // outlive this object. |
| 118 AutofillDriver* driver_; // weak | 126 AutofillDriver* driver_; // weak |
| 119 | 127 |
| 120 // The ID of the last request sent for form field Autofill. Used to ignore | 128 // The ID of the last request sent for form field Autofill. Used to ignore |
| 121 // out of date responses. | 129 // out of date responses. |
| 122 int query_id_; | 130 int query_id_; |
| 123 | 131 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 143 std::vector<base::string16> data_list_labels_; | 151 std::vector<base::string16> data_list_labels_; |
| 144 | 152 |
| 145 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; | 153 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; |
| 146 | 154 |
| 147 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); | 155 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); |
| 148 }; | 156 }; |
| 149 | 157 |
| 150 } // namespace autofill | 158 } // namespace autofill |
| 151 | 159 |
| 152 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ | 160 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ |
| OLD | NEW |