1 // Copyright 2014 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.
5 #ifndef CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTERNALS_UI_H_
6 #define CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTERNALS_UI_H_
8 #include "components/password_manager/core/browser/password_manager_logger.h"
9 #include "content/public/browser/web_ui_controller.h"
11 class PasswordManagerInternalsUI : public content::WebUIController,
12 public PasswordManagerLogger {
14 explicit PasswordManagerInternalsUI(content::WebUI* web_ui);
15 virtual ~PasswordManagerInternalsUI();
17 // PasswordManagerLogger implementation.
18 virtual void LogSavePasswordProgress(const std::string& text) OVERRIDE;
21 // These types describe which kinds of notifications
22 // PasswordManagerInternalsUI can send to PasswordManagerClient.
23 enum ClientNotificationType {
24 PAGE_OPENED, // Send when the page gets opened.
25 PAGE_CLOSED // Send when the page gets closed.
28 // This acts on all PasswordManagerClient instances of the current profile
29 // based on |notification_type|:
30 // PAGE_OPENED -- |this| is set as clients' PasswordManagerLogger
31 // PAGE_CLOSED -- PasswordManagerLogger is reset for clients
32 void NotifyAllPasswordManagerClients(
33 ClientNotificationType notification_type);
35 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsUI);
38 #endif // CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTERNALS_UI_H_