Commit 9139a6a1 authored by noms's avatar noms Committed by Commit bot

Revert of Add Autofill to the <webview> chrome://chrome-signin page (patchset...

Revert of Add Autofill to the <webview> chrome://chrome-signin page (patchset #12 id:340001 of https://codereview.chromium.org/866523002/)

Reason for revert:
Introduced crashes in ManagePasswordsUIController::OnPasswordSubmitted:(

https://crash.corp.google.com/browse?q=product.name%3D%27Chrome%27%20AND%20product.version%3D%2742.0.2309.0%27%20AND%20custom_data.ChromeCrashProto.channel%3D%27canary%27%20AND%20custom_data.ChromeCrashProto.ptype%3D%27browser%27%20AND%20custom_data.ChromeCrashProto.magic_signature_1.name%3D%27ManagePasswordsUIController%3A%3AOnPasswordSubmitted%27

Original issue's description:
> Add Autofill to the <webview> chrome://chrome-signin page
>
> The change in the chrome_autofill_client.cc is needed to enable the autofill popup on
> Mac.
>
> BUG=447938
> TEST=Start Chrome. Navigate to chrome://chrome-signin. Enter a correct username
> with an incorrect password. After the password error appears, you should be able
> to autofill that username.
>
> Committed: https://crrev.com/4a1e13b16b5ef2cb6f7c800ad3c08f1f44bef285
> Cr-Commit-Position: refs/heads/master@{#314889}
>
> Committed: https://crrev.com/e6d3ca36ec225b0e13e385318c6c4f35fad4ca47
> Cr-Commit-Position: refs/heads/master@{#316899}

TBR=estade@chromium.org,fsamuel@chromium.org,lazyboy@chromium.org,vabr@chromium.org,engedy@chromium.org,jww@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=447938

Review URL: https://codereview.chromium.org/944513002

Cr-Commit-Position: refs/heads/master@{#317105}
parent 16247bd5
......@@ -2,19 +2,15 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/guest_view/web_view/chrome_web_view_guest_delegate.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_extension_web_contents_observer.h"
#include "chrome/browser/favicon/favicon_tab_helper.h"
#include "chrome/browser/password_manager/chrome_password_manager_client.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
#include "chrome/browser/ui/autofill/chrome_autofill_client.h"
#include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h"
#include "chrome/common/chrome_version_info.h"
#include "chrome/common/url_constants.h"
#include "components/autofill/content/browser/content_autofill_driver_factory.h"
#include "components/pdf/browser/pdf_web_contents_helper.h"
#include "components/renderer_context_menu/context_menu_delegate.h"
#include "extensions/browser/api/web_request/web_request_api.h"
......@@ -80,24 +76,6 @@ void ChromeWebViewGuestDelegate::OnAttachWebViewHelpers(
contents,
scoped_ptr<pdf::PDFWebContentsHelperClient>(
new ChromePDFWebContentsHelperClient()));
// Currently, autofill is only enabled for the Chrome sign in page.
// TODO(fsamuel): If this changes in the future, revisit the use of autofill
// in <webview>.
if (web_view_guest_->GetOwnerSiteURL().GetOrigin().spec() !=
chrome::kChromeUIChromeSigninURL) {
return;
}
autofill::ChromeAutofillClient::CreateForWebContents(contents);
ChromePasswordManagerClient::CreateForWebContentsWithAutofillClient(
contents,
autofill::ChromeAutofillClient::FromWebContents(contents));
autofill::ContentAutofillDriverFactory::CreateForWebContentsAndDelegate(
contents,
autofill::ChromeAutofillClient::FromWebContents(contents),
g_browser_process->GetApplicationLocale(),
autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
}
void ChromeWebViewGuestDelegate::OnDidCommitProvisionalLoadForFrame(
......
......@@ -186,13 +186,13 @@ void ChromeAutofillClient::ShowAutofillPopup(
element_bounds + client_area.OffsetFromOrigin();
// Will delete or reuse the old |popup_controller_|.
popup_controller_ = AutofillPopupControllerImpl::GetOrCreate(
popup_controller_,
delegate,
web_contents(),
web_contents()->GetContentNativeView(),
element_bounds_in_screen_space,
text_direction);
popup_controller_ =
AutofillPopupControllerImpl::GetOrCreate(popup_controller_,
delegate,
web_contents(),
web_contents()->GetNativeView(),
element_bounds_in_screen_space,
text_direction);
popup_controller_->Show(suggestions);
}
......
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