[Mfill Android] Introduces ManualFillingController

This is the first CL to generalized the keyboard accessory handlers
on the Chrome backend, so they can be also used to serve Autofill data.

This CL spawns ManualFillingController from PasswordAccessoryController,
both controllers are attached to a WebContents object.

The new controller which is responsible for:
 - Coordinating requests from type-specific accessory controllers
   (Autofill and Password) and forwarding them to the native UI;
 - Forwarding events from the native UI to the type-specific
   controllers.

To allow mocking of these classes in unit tests, this CL defines an
interface and an implementation for each controller.

Code review order suggestion:
 - password_accessory_controller.h: split original class into
   interface + implementation, this is the interface;
 - password_accessory_controller_impl.h: class implementing
   the interface;
 - manual_filling_controller.h: very similar to
   password_accessory_controller, but git doesn't understand
   copies; same idea: interface + implementation;
 - manual_filling_controller_impl.cc: class implementing the
   interface;
 - password_accessory_controller_impl*.cc;
 - manual_filling_controller_impl*.cc;
 - everything else, basically minor changes.

In order to keep this CL more focused on the split, some steps of the
generalization will be done in follow-ups (check TODOs pointing to
https://crbug.com/896690), and the ManualFillingCoordinator simply
forwards events to PasswordAccessoryController. One example is
password generation: in this CL, MFC contains methods to forward
password generation events to PAC; in the final state, MFC will
define a general function that handles "actions" and will forward
events to type-specific coordinators (passwords or autofill) based
on action type.

Please refer to the linked bug for details on next steps of this
refactoring. Once it's done, we will be able to plug in Autofill
requests.

Bug: 905669
Change-Id: I4fb2fd1b4a729114d3c7e4dd59ec7a582ba8aea0
Reviewed-on: https://chromium-review.googlesource.com/c/1336557
Reviewed-by: Mathieu Perreault <[email protected]>
Reviewed-by: agrieve <[email protected]>
Reviewed-by: Sebastien Seguin-Gagnon <[email protected]>
Reviewed-by: Friedrich Horschig [CET] <[email protected]>
Reviewed-by: Vasilii Sukhanov <[email protected]>
Commit-Queue: Fabio Tirelo <[email protected]>
Cr-Commit-Position: refs/heads/master@{#609797}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 81f9959..88975f2 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -2419,6 +2419,10 @@
       "autofill/android/personal_data_manager_android.cc",
       "autofill/android/personal_data_manager_android.h",
       "autofill/android/phone_number_util_android.cc",
+      "autofill/manual_filling_controller.h",
+      "autofill/manual_filling_controller_impl.cc",
+      "autofill/manual_filling_controller_impl.h",
+      "autofill/manual_filling_view_interface.h",
       "banners/app_banner_infobar_delegate_android.cc",
       "banners/app_banner_infobar_delegate_android.h",
       "banners/app_banner_manager_android.cc",
@@ -2484,10 +2488,10 @@
       "password_manager/credential_android.h",
       "password_manager/generated_password_saved_infobar_delegate_android.cc",
       "password_manager/generated_password_saved_infobar_delegate_android.h",
-      "password_manager/password_accessory_controller.cc",
       "password_manager/password_accessory_controller.h",
+      "password_manager/password_accessory_controller_impl.cc",
+      "password_manager/password_accessory_controller_impl.h",
       "password_manager/password_accessory_metrics_util.h",
-      "password_manager/password_accessory_view_interface.h",
       "password_manager/password_generation_dialog_view_interface.h",
       "password_manager/password_manager_infobar_delegate_android.cc",
       "password_manager/password_manager_infobar_delegate_android.h",