Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 module autofill.mojom; | 5 module autofill.mojom; |
| 6 | 6 |
| 7 import "components/autofill/content/public/interfaces/autofill_types.mojom"; | |
| 8 | |
| 9 // This interface lives in the renderer process per one render frame, | |
| 10 // is responsible to communicate with corresponding autofill driver. | |
|
dcheng
2016/07/14 04:31:44
Nit: There is one instance of this interface per r
leonhsl(Using Gerrit)
2016/07/14 09:57:31
Done and Thanks.
| |
| 7 interface AutofillAgent { | 11 interface AutofillAgent { |
| 8 // Tells the render frame that a user gesture was observed | 12 // Tells the render frame that a user gesture was observed |
| 9 // somewhere in the tab (including in a different frame). | 13 // somewhere in the tab (including in a different frame). |
| 10 FirstUserGestureObservedInTab(); | 14 FirstUserGestureObservedInTab(); |
| 15 | |
| 16 // Instructs the renderer to fill the active form with the given form data. | |
| 17 // Please refer AutofillDriver.QueryFormFieldAutofill comments about the |id|. | |
| 18 FillForm(int32 id, FormData form); | |
| 19 | |
| 20 // Instructs the renderer to preview the active form with the given form data. | |
| 21 // Please refer AutofillDriver.QueryFormFieldAutofill comments about the |id|. | |
| 22 PreviewForm(int32 id, FormData form); | |
| 23 | |
| 24 // Sends the heuristic and server field type predictions to the renderer. | |
| 25 FieldTypePredictionsAvailable(array<FormDataPredictions> forms); | |
| 26 | |
| 27 // Clears the currently displayed Autofill results. | |
| 28 ClearForm(); | |
| 29 | |
| 30 // Tells the renderer that the Autofill previewed form should be cleared. | |
| 31 ClearPreviewedForm(); | |
| 32 | |
| 33 // Sets the currently selected node's value. | |
| 34 FillFieldWithValue(string value); | |
| 35 | |
| 36 // Sets the suggested value for the currently previewed node. | |
| 37 PreviewFieldWithValue(string value); | |
| 38 | |
| 39 // Sets the currently selected node's value to be the given data list value. | |
| 40 AcceptDataListSuggestion(string value); | |
| 41 | |
| 42 // Tells the renderer to fill the username and password with with given | |
| 43 // values. | |
| 44 FillPasswordSuggestion(string username, string password); | |
| 45 | |
| 46 // Tells the renderer to preview the username and password with the given | |
| 47 // values. | |
| 48 PreviewPasswordSuggestion(string username, string password); | |
| 49 | |
| 50 // Sent when a password form is initially detected and suggestions should be | |
| 51 // shown. Used by the fill-on-select experiment. | |
| 52 // |key| is the unique id associated with the password form fill data. | |
| 53 ShowInitialPasswordAccountSuggestions(int32 key, PasswordFormFillData form_dat a); | |
| 11 }; | 54 }; |
| OLD | NEW |