Implement signin using webview
This CL implements the Chrome signin on desktop using webview. Since the webview approach is
significantly different than the current iframe one, thus I created a fork of some files
instead of adding more logic to the existing over-complicated code. The feature is enabled
under a flag --enable-webview-based-signin. Once the feature is fully launched on both dekstop
and ChromeOS, the old files should be deleted.
There are a few known issues.
1. Gaia needs to update their script to post credentials directly to chrome://chrome-signin
instead of the gaia auth extension. Before the gaia code is updated, webview signin cannot scrape
password and the checkbox value for choosing what to sync.
2. Webview currently only loads in a full tab, need to investigate why it doesn't work when
embedded in the avatar menu.
3. Some webview apis are broken in an extension-less webui context.
https://codereview.chromium.org/670173002/ fixes a few that are required for a minimum desktop
signin flow. One important missing piece is the extension messaging api, and as a result Gnubby
does not work with a webview, tracked in crbug/426016.
4. Some standard WebUI features are missing, such as zoom, find, print preview, need to
decide whether it is worth to support them.
5. Webview is not fully accessibility proof. According to webview team, most accessibility bugs
have been fixed by the accessibility team (crbug/330307, crbug/368298), need to confirm.
6. This CL only implements the desktop signin flow. The ChromeOS signin flow is a superset
of the desktop one, and ChromeOS team needs to add extra logic to complete it for ChromeOS.
BUG=364432
Review URL: https://codereview.chromium.org/646983008
Cr-Commit-Position: refs/heads/master@{#301130}
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index dd878a3f..7ee392f 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1467,6 +1467,13 @@
SINGLE_VALUE_TYPE(switches::kEnableWebBasedSignin)
},
{
+ "enable-webview-based-signin",
+ IDS_FLAGS_ENABLE_WEBVIEW_BASED_SIGNIN_NAME,
+ IDS_FLAGS_ENABLE_WEBVIEW_BASED_SIGNIN_DESCRIPTION,
+ kOsMac | kOsWin | kOsLinux,
+ SINGLE_VALUE_TYPE(switches::kEnableWebviewBasedSignin)
+ },
+ {
"enable-google-profile-info",
IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_NAME,
IDS_FLAGS_ENABLE_GOOGLE_PROFILE_INFO_DESCRIPTION,