OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTE
RNALS_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTE
RNALS_UI_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTE
RNALS_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_INTE
RNALS_UI_H_ |
7 | 7 |
8 #include "components/password_manager/core/browser/log_receiver.h" | 8 #include "components/password_manager/core/browser/log_receiver.h" |
9 #include "content/public/browser/web_contents_observer.h" | 9 #include "content/public/browser/web_contents_observer.h" |
10 #include "content/public/browser/web_ui_controller.h" | 10 #include "content/public/browser/web_ui_controller.h" |
11 | 11 |
12 class PasswordManagerInternalsUI : public content::WebUIController, | 12 class PasswordManagerInternalsUI : public content::WebUIController, |
13 public content::WebContentsObserver, | 13 public content::WebContentsObserver, |
14 public password_manager::LogReceiver { | 14 public password_manager::LogReceiver { |
15 public: | 15 public: |
16 explicit PasswordManagerInternalsUI(content::WebUI* web_ui); | 16 explicit PasswordManagerInternalsUI(content::WebUI* web_ui); |
17 virtual ~PasswordManagerInternalsUI(); | 17 ~PasswordManagerInternalsUI() override; |
18 | 18 |
19 // WebContentsObserver implementation. | 19 // WebContentsObserver implementation. |
20 virtual void DidStartLoading( | 20 void DidStartLoading(content::RenderViewHost* render_view_host) override; |
21 content::RenderViewHost* render_view_host) override; | 21 void DidStopLoading(content::RenderViewHost* render_view_host) override; |
22 virtual void DidStopLoading( | |
23 content::RenderViewHost* render_view_host) override; | |
24 | 22 |
25 // LogReceiver implementation. | 23 // LogReceiver implementation. |
26 virtual void LogSavePasswordProgress(const std::string& text) override; | 24 void LogSavePasswordProgress(const std::string& text) override; |
27 | 25 |
28 private: | 26 private: |
29 // If currently registered with PasswordManagerInternalsService, unregisters | 27 // If currently registered with PasswordManagerInternalsService, unregisters |
30 // |this|. Otherwise this is a no-op. | 28 // |this|. Otherwise this is a no-op. |
31 void UnregisterFromLoggingService(); | 29 void UnregisterFromLoggingService(); |
32 | 30 |
33 // Whether |this| registered as a log receiver with the | 31 // Whether |this| registered as a log receiver with the |
34 // PasswordManagerInternalsService. | 32 // PasswordManagerInternalsService. |
35 bool registered_with_logging_service_; | 33 bool registered_with_logging_service_; |
36 | 34 |
37 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsUI); | 35 DISALLOW_COPY_AND_ASSIGN(PasswordManagerInternalsUI); |
38 }; | 36 }; |
39 | 37 |
40 #endif // CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_I
NTERNALS_UI_H_ | 38 #endif // CHROME_BROWSER_UI_WEBUI_PASSWORD_MANAGER_INTERNALS_PASSWORD_MANAGER_I
NTERNALS_UI_H_ |
OLD | NEW |