| Index: components/password_manager/content/browser/password_visibility_service.cc
|
| diff --git a/components/password_manager/content/browser/password_visibility_service.cc b/components/password_manager/content/browser/password_visibility_service.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a32883622d930726cd31a30d4ce957126f9e0a2b
|
| --- /dev/null
|
| +++ b/components/password_manager/content/browser/password_visibility_service.cc
|
| @@ -0,0 +1,37 @@
|
| +// Copyright 2016 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.
|
| +
|
| +#include "components/password_manager/content/browser/password_visibility_service.h"
|
| +
|
| +#include "components/password_manager/content/browser/password_visibility_service_factory.h"
|
| +#include "content/public/browser/render_frame_host.h"
|
| +#include "content/public/browser/web_contents.h"
|
| +
|
| +namespace password_manager {
|
| +
|
| +PasswordVisibilityService::PasswordVisibilityService() : weak_factory_(this) {}
|
| +
|
| +PasswordVisibilityService::~PasswordVisibilityService() {}
|
| +
|
| +// static
|
| +PasswordVisibilityService* PasswordVisibilityService::GetForRenderFrameHost(
|
| + content::RenderFrameHost* render_frame_host) {
|
| + PasswordVisibilityServiceFactory* factory =
|
| + PasswordVisibilityServiceFactory::FromWebContents(
|
| + content::WebContents::FromRenderFrameHost(render_frame_host));
|
| + return factory ? factory->GetServiceForFrame(render_frame_host) : nullptr;
|
| +}
|
| +
|
| +void PasswordVisibilityService::BindRequest(
|
| + blink::mojom::SensitiveInputVisibilityServiceRequest request) {
|
| + bindings_.AddBinding(this, std::move(request));
|
| +}
|
| +
|
| +void PasswordVisibilityService::PasswordFieldVisible() {
|
| + // TODO(estark): notify the WebContents that a password field was
|
| + // shown, which will downgrade the security UI
|
| + // appropriately. https://crbug.com/647560
|
| +}
|
| +
|
| +} // namespace password_manager
|
|
|