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 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_PASSWORD_VISIBILITY_SERVICE_
H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_PASSWORD_VISIBILITY_SERVICE_
H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "mojo/public/cpp/bindings/binding_set.h" |
| 10 #include "third_party/WebKit/public/platform/modules/sensitive_input_visibility/
sensitive_input_visibility_service.mojom.h" |
| 11 |
| 12 namespace content { |
| 13 class RenderFrameHost; |
| 14 class WebContents; |
| 15 } |
| 16 |
| 17 namespace password_manager { |
| 18 |
| 19 // There is one PasswordVisibilityService per RenderFrameHost. |
| 20 // The lifetime is managed by the PasswordVisibilityServiceFactory. |
| 21 class PasswordVisibilityService |
| 22 : public blink::mojom::SensitiveInputVisibilityService { |
| 23 public: |
| 24 PasswordVisibilityService(); |
| 25 ~PasswordVisibilityService() override; |
| 26 |
| 27 // Gets the service for |render_frame_host|. |
| 28 static PasswordVisibilityService* GetForRenderFrameHost( |
| 29 content::RenderFrameHost* render_frame_host); |
| 30 |
| 31 void BindRequest( |
| 32 blink::mojom::SensitiveInputVisibilityServiceRequest request); |
| 33 |
| 34 // blink::mojom::SensitiveInputVisibility: |
| 35 void PasswordFieldVisible() override; |
| 36 |
| 37 private: |
| 38 mojo::BindingSet<blink::mojom::SensitiveInputVisibilityService> bindings_; |
| 39 |
| 40 base::WeakPtrFactory<PasswordVisibilityService> weak_factory_; |
| 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(PasswordVisibilityService); |
| 43 }; |
| 44 |
| 45 } // namespace password_manager |
| 46 |
| 47 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_PASSWORD_VISIBILITY_SERVI
CE_H_ |
OLD | NEW |