// Copyright 2022 The Chromium Authors
// 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.components.metrics";
option java_outer_classname = "OmniboxFocusTypeProtos";
package metrics;
// For search requests, this enum specifies how the user last interacted with
// the UI control. This is used for both the omnibox and NTP realbox.
//
// It is somewhat of a misnomer to call it OmniboxFocusType, since the enum now
// covers UI interactions unrelated to focus. But we are keeping the old name to
// match the "oft" CGI param.
//
// These values are used as HTTP CGI parameter values. Entries should not be
// renumbered and numeric values should never be reused.
enum OmniboxFocusType {
// The default value. This is used for any search requests without any
// special interaction annotation, including: normal omnibox searches,
// as-you-type omnibox suggestions, as well as non-omnibox searches.
INTERACTION_DEFAULT = 0;
// This search request is triggered by the user focusing the omnibox.
INTERACTION_FOCUS = 1;
// This search request is triggered by the user deleting all of the
// omnibox permanent text at once, i.e. user is on "https://example.com",
// does Ctrl+L which selects the whole URL, then presses Backspace.
//
// Note that INTERACTION_CLOBBER applies in fairly limited circumstances. For
// example, the following cases do NOT qualify and are instead marked as
// INTERACTION_DEFAULT:
// - User deletes their own typed text.
// - User deletes the permanent text one character at a time.
// - User uses Cut (Ctrl+X) to delete the permanent text.
INTERACTION_CLOBBER = 2;
}