Commit 7bdbb9df authored by Jan Wilken Dörrie's avatar Jan Wilken Dörrie Committed by Commit Bot

[Passwords] Add interface definition for a Touch To Fill View

This change adds the interface definition for a Touch To Fill View which
will is intended to be implemented on Android in a follow-up CL.

Bug: 957532
Change-Id: I819e8178db21c32d577560da82c64d79856a59cb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1798356
Commit-Queue: Jan Wilken Dörrie <jdoerrie@chromium.org>
Reviewed-by: default avatarFriedrich [CET] <fhorschig@chromium.org>
Cr-Commit-Position: refs/heads/master@{#695749}
parent 50577e88
...@@ -2842,6 +2842,7 @@ jumbo_split_static_library("browser") { ...@@ -2842,6 +2842,7 @@ jumbo_split_static_library("browser") {
"password_manager/save_password_infobar_delegate_android.h", "password_manager/save_password_infobar_delegate_android.h",
"password_manager/touch_to_fill_controller.cc", "password_manager/touch_to_fill_controller.cc",
"password_manager/touch_to_fill_controller.h", "password_manager/touch_to_fill_controller.h",
"password_manager/touch_to_fill_view.h",
"password_manager/update_password_infobar_delegate_android.cc", "password_manager/update_password_infobar_delegate_android.cc",
"password_manager/update_password_infobar_delegate_android.h", "password_manager/update_password_infobar_delegate_android.h",
"payments/android/can_make_payment_query_android.cc", "payments/android/can_make_payment_query_android.cc",
......
// Copyright 2019 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.
#ifndef CHROME_BROWSER_PASSWORD_MANAGER_TOUCH_TO_FILL_VIEW_H_
#define CHROME_BROWSER_PASSWORD_MANAGER_TOUCH_TO_FILL_VIEW_H_
#include "base/callback_forward.h"
#include "base/containers/span.h"
#include "base/strings/string_piece_forward.h"
namespace password_manager {
struct CredentialPair;
}
// This class represents the interface used for communicating between the Touch
// To Fill controller with the Android frontend.
class TouchToFillView {
public:
using ShowCallback =
base::OnceCallback<void(const password_manager::CredentialPair&)>;
TouchToFillView() = default;
TouchToFillView(const TouchToFillView&) = delete;
TouchToFillView& operator=(const TouchToFillView&) = delete;
virtual ~TouchToFillView() = default;
// Instructs Touch To Fill to show the provided |credentials| to the user.
// |formatted_url| contains a human friendly version of the current origin.
// Invokes |callback| once the user chose a credential.
virtual void Show(
base::StringPiece16 formatted_url,
base::span<const password_manager::CredentialPair> credentials,
ShowCallback callback) = 0;
// Invoked if the user dismissed the Touch To Fill sheet without choosing a
// credential.
virtual void OnDismiss() = 0;
};
#endif // CHROME_BROWSER_PASSWORD_MANAGER_TOUCH_TO_FILL_VIEW_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment