blob: 4ea533fd8db86111501440ec23f9fd647e09b23f [file] [log] [blame]
// Copyright 2020 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.
syntax = "proto2";
option optimize_for = LITE_RUNTIME;
option java_package = "org.chromium.chrome.browser.autofill_assistant.proto";
option java_multiple_files = true;
package autofill_assistant;
message AutofillValue {
message Profile { optional string identifier = 1; }
// The profile to be used. This has to be requested with a
// |CollectUserDataAction| first.
optional Profile profile = 1;
// A string containing any number of "${key}" placeholders, where the key is
// an integer corresponding to entries from field_types.h or
// |AutofillFormatProto::AutofillAssistantCustomField|.
// Note that the set of actually available fields are outside of our
// control and are retrieved automatically from the provided profile.
optional string value_expression = 2;
}
message AutofillValueRegexp {
message Profile { optional string identifier = 1; }
// The profile to be used. This has to be requested with a
// |CollectUserDataAction| first.
optional Profile profile = 1;
// A string containing any number of "${key}" placeholders, where the key is
// an integer corresponding to entries from field_types.h or
// |AutofillFormatProto::AutofillAssistantCustomField|.
// Note that the set of actually available fields are outside of our
// control and are retrieved automatically from the provided profile.
// The |value_expression| needs to escape all text outside of placeholders,
// e.g. a pattern like "+${12}" needs to escape the "+". The pattern keys
// ("${12}") should not be escaped, this will be handled during replacement.
optional TextFilter value_expression = 2;
}
// A wrapper for regular expressions, e.g. used for filtering elements by their
// text.
message TextFilter {
// Javascript RE2 regular expression to apply to the text. This is evaluated
// with Regexp.test, so it's a "find" and will be satisfied whenever the
// text contains at least one substring that matches the given regular
// expression.
optional string re2 = 1;
// If true, the regular expression is case-sensitive.
optional bool case_sensitive = 2;
}
// A value that allows filling usernames and passwords stored in the password
// manager. The credentials have to be selected before in a CollectUserData
// step.
message PasswordManagerValue {
enum CredentialType {
NOT_SET = 0;
PASSWORD = 1;
USERNAME = 2;
}
optional CredentialType credential_type = 1;
}
message TextValue {
oneof value {
string text = 1;
AutofillValue autofill_value = 2;
PasswordManagerValue password_manager_value = 3;
string client_memory_key = 4;
}
}
// A key event, for definition see here:
// https://chromedevtools.github.io/devtools-protocol/tot/Input/#method-dispatchKeyEvent
message KeyEvent {
// Unique key identifier (e.g., 'U+0041').
optional string key_identifier = 1;
// Unique DOM defined string value for each physical key (e.g., 'KeyA').
optional string code = 2;
// Text as generated by processing a virtual key code with a keyboard layout.
optional string text = 3;
// Unique DOM defined string value describing the meaning of the key in the
// context of active modifiers, keyboard layout, etc (e.g., 'AltGr').
optional string key = 4;
// Editing commands to send with the key event (e.g., 'selectAll').
// The list of commands can be found here:
// https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/editor_command_names.h
repeated string command = 5;
}