Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(303)

Side by Side Diff: components/password_manager/content/browser/password_visibility_service.cc

Issue 2378503002: Observe visibility of password inputs, for HTTP-bad phase 1 (Closed)
Patch Set: fix superclass createLayoutObject call Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698