File: autofill_agent.mojom

package info (click to toggle)
chromium-browser 57.0.2987.98-1~deb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 2,637,852 kB
  • ctags: 2,544,394
  • sloc: cpp: 12,815,961; ansic: 3,676,222; python: 1,147,112; asm: 526,608; java: 523,212; xml: 286,794; perl: 92,654; sh: 86,408; objc: 73,271; makefile: 27,698; cs: 18,487; yacc: 13,031; tcl: 12,957; pascal: 4,875; ml: 4,716; lex: 3,904; sql: 3,862; ruby: 1,982; lisp: 1,508; php: 1,368; exp: 404; awk: 325; csh: 117; jsp: 39; sed: 37
file content (107 lines) | stat: -rw-r--r-- 4,747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

module autofill.mojom;

import "components/autofill/content/common/autofill_types.mojom";
import "mojo/common/string16.mojom";

// There is one instance of this interface per render frame in the render
// process.
interface AutofillAgent {
  // Tells the render frame that a user gesture was observed
  // somewhere in the tab (including in a different frame).
  FirstUserGestureObservedInTab();

  // Instructs the renderer to fill the active form with the given form data.
  // Please refer AutofillDriver.QueryFormFieldAutofill comments about the |id|.
  FillForm(int32 id, FormData form);

  // Instructs the renderer to preview the active form with the given form data.
  // Please refer AutofillDriver.QueryFormFieldAutofill comments about the |id|.
  PreviewForm(int32 id, FormData form);

  // Sends the heuristic and server field type predictions to the renderer.
  FieldTypePredictionsAvailable(array<FormDataPredictions> forms);

  // Clears the currently displayed Autofill results.
  ClearForm();

  // Tells the renderer that the Autofill previewed form should be cleared.
  ClearPreviewedForm();

  // Sets the currently selected node's value.
  FillFieldWithValue(mojo.common.mojom.String16 value);

  // Sets the suggested value for the currently previewed node.
  PreviewFieldWithValue(mojo.common.mojom.String16 value);

  // Sets the currently selected node's value to be the given data list value.
  AcceptDataListSuggestion(mojo.common.mojom.String16 value);

  // Tells the renderer to fill the username and password with with given
  // values.
  FillPasswordSuggestion(mojo.common.mojom.String16 username,
                         mojo.common.mojom.String16 password);

  // Tells the renderer to preview the username and password with the given
  // values.
  PreviewPasswordSuggestion(mojo.common.mojom.String16 username,
                            mojo.common.mojom.String16 password);

  // Sent when a password form is initially detected and suggestions should be
  // shown. Used by the fill-on-select experiment.
  // |key| is the unique id associated with the password form fill data.
  ShowInitialPasswordAccountSuggestions(int32 key,
                                        PasswordFormFillData form_data);
};

// There is one instance of this interface per render frame in the render
// process.
interface PasswordAutofillAgent {
  // Fills a password form and prepare field autocomplete for multiple
  // matching logins. Lets the renderer know if it should disable the popup
  // because the browser process will own the popup UI. |key| serves for
  // identifying the fill form data in subsequent
  // ShowPasswordSuggestions messages to the browser.
  FillPasswordForm(int32 key, PasswordFormFillData form_data);

  // Notification to start (|active| == true) or stop (|active| == false)
  // logging the decisions made about saving the password.
  SetLoggingState(bool active);

  // Sent when Autofill manager gets the query response from the Autofill server
  // which contains information about username and password for some forms.
  // |predictions| maps forms to their username fields.
  AutofillUsernameAndPasswordDataReceived(FormsPredictionsMap predictions);

  // Tells the renderer to find the focused password form (assuming it exists).
  // Renderer is expected to return the found password form. If no password form
  // is focused, the response will contain an empty |autofill::PasswordForm|.
  FindFocusedPasswordForm() => (PasswordForm form);
};

// There is one instance of this interface per render frame in the render
// process.
interface PasswordGenerationAgent {
  // Tells the renderer to populate the correct password fields with this
  // generated password.
  GeneratedPasswordAccepted(mojo.common.mojom.String16 generated_password);

  // Tells the renderer to find a focused element, and if it is a password field
  // eligible for generation then to trigger generation by responding to the
  // browser with the message |ShowPasswordGenerationPopup|.
  UserTriggeredGeneratePassword();

  // Tells the renderer that this password form is not blacklisted.  A form can
  // be blacklisted if a user chooses "never save passwords for this site".
  FormNotBlacklisted(PasswordForm form);

  // Sent when Autofill manager gets the query response from the Autofill server
  // and there are fields classified for password generation in the response.
  FoundFormsEligibleForGeneration(array<PasswordFormGenerationData> forms);

  // Tells the renderer to enable the form classifier.
  AllowToRunFormClassifier();
};