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

Side by Side Diff: components/autofill/core/browser/autofill_external_delegate.h

Issue 286243002: Mac: Autofill should not immediately request access to address book. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add IPCs. 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 unified diff | Download patch
OLDNEW
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
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 // Called by the autofill manager after it receives an IPC from the renderer
84 // acknowledging an earlier ping IPC.
85 void OnPingAck();
86
83 protected: 87 protected:
84 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr(); 88 base::WeakPtr<AutofillExternalDelegate> GetWeakPtr();
85 89
86 private: 90 private:
87 // Fills the form with the Autofill data corresponding to |unique_id|. 91 // 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 92 // 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 93 // would be selected and if |is_preview| is false then the user has selected
90 // this data. 94 // this data.
91 void FillAutofillFormData(int unique_id, bool is_preview); 95 void FillAutofillFormData(int unique_id, bool is_preview);
92 96
(...skipping 11 matching lines...) Expand all
104 std::vector<base::string16>* icons, 108 std::vector<base::string16>* icons,
105 std::vector<int>* unique_ids); 109 std::vector<int>* unique_ids);
106 110
107 // Insert the data list values at the start of the given list, including 111 // Insert the data list values at the start of the given list, including
108 // any required separators. 112 // any required separators.
109 void InsertDataListValues(std::vector<base::string16>* values, 113 void InsertDataListValues(std::vector<base::string16>* values,
110 std::vector<base::string16>* labels, 114 std::vector<base::string16>* labels,
111 std::vector<base::string16>* icons, 115 std::vector<base::string16>* icons,
112 std::vector<int>* unique_ids); 116 std::vector<int>* unique_ids);
113 117
118 #if defined(OS_MACOSX)
119 // Reissues the most recent query, which will reopen the autofill popup.
120 void ReissueQuery();
121 // Pings the renderer.
122 void PingRenderer();
123 #endif
124
114 AutofillManager* manager_; // weak. 125 AutofillManager* manager_; // weak.
115 126
116 // Provides driver-level context to the shared code of the component. Must 127 // Provides driver-level context to the shared code of the component. Must
117 // outlive this object. 128 // outlive this object.
118 AutofillDriver* driver_; // weak 129 AutofillDriver* driver_; // weak
119 130
120 // The ID of the last request sent for form field Autofill. Used to ignore 131 // The ID of the last request sent for form field Autofill. Used to ignore
121 // out of date responses. 132 // out of date responses.
122 int query_id_; 133 int query_id_;
123 134
(...skipping 19 matching lines...) Expand all
143 std::vector<base::string16> data_list_labels_; 154 std::vector<base::string16> data_list_labels_;
144 155
145 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_; 156 base::WeakPtrFactory<AutofillExternalDelegate> weak_ptr_factory_;
146 157
147 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate); 158 DISALLOW_COPY_AND_ASSIGN(AutofillExternalDelegate);
148 }; 159 };
149 160
150 } // namespace autofill 161 } // namespace autofill
151 162
152 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_ 163 #endif // COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_EXTERNAL_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698