OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "components/password_manager/content/browser/password_visibility_servic
e.h" |
| 6 |
| 7 #include "components/password_manager/content/browser/password_visibility_servic
e_factory.h" |
| 8 #include "content/public/browser/render_frame_host.h" |
| 9 #include "content/public/browser/web_contents.h" |
| 10 |
| 11 namespace password_manager { |
| 12 |
| 13 PasswordVisibilityService::PasswordVisibilityService() : weak_factory_(this) {} |
| 14 |
| 15 PasswordVisibilityService::~PasswordVisibilityService() {} |
| 16 |
| 17 // static |
| 18 PasswordVisibilityService* PasswordVisibilityService::GetForRenderFrameHost( |
| 19 content::RenderFrameHost* render_frame_host) { |
| 20 PasswordVisibilityServiceFactory* factory = |
| 21 PasswordVisibilityServiceFactory::FromWebContents( |
| 22 content::WebContents::FromRenderFrameHost(render_frame_host)); |
| 23 return factory ? factory->GetServiceForFrame(render_frame_host) : nullptr; |
| 24 } |
| 25 |
| 26 void PasswordVisibilityService::BindRequest( |
| 27 blink::mojom::SensitiveInputVisibilityServiceRequest request) { |
| 28 bindings_.AddBinding(this, std::move(request)); |
| 29 } |
| 30 |
| 31 void PasswordVisibilityService::PasswordFieldVisible() { |
| 32 // TODO(estark): notify the WebContents that a password field was |
| 33 // shown, which will downgrade the security UI |
| 34 // appropriately. https://crbug.com/647560 |
| 35 } |
| 36 |
| 37 } // namespace password_manager |
OLD | NEW |