OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
10 #include "base/stl_util-inl.h" | 10 #include "base/stl_util-inl.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 // When a form is submitted, we prepare to save the password but wait | 46 // When a form is submitted, we prepare to save the password but wait |
47 // until we decide the user has successfully logged in. This is step 1 | 47 // until we decide the user has successfully logged in. This is step 1 |
48 // of 2 (see SavePassword). | 48 // of 2 (see SavePassword). |
49 void ProvisionallySavePassword(webkit_glue::PasswordForm form); | 49 void ProvisionallySavePassword(webkit_glue::PasswordForm form); |
50 | 50 |
51 // WebNavigationObserver overrides. | 51 // WebNavigationObserver overrides. |
52 virtual void DidStopLoading(); | 52 virtual void DidStopLoading(); |
53 virtual void DidNavigateAnyFramePostCommit( | 53 virtual void DidNavigateAnyFramePostCommit( |
54 const NavigationController::LoadCommittedDetails& details, | 54 const NavigationController::LoadCommittedDetails& details, |
55 const ViewHostMsg_FrameNavigate_Params& params); | 55 const ViewHostMsg_FrameNavigate_Params& params); |
56 virtual void PasswordFormsFound( | 56 virtual bool OnMessageReceived(const IPC::Message& message); |
| 57 |
| 58 void OnPasswordFormsFound( |
57 const std::vector<webkit_glue::PasswordForm>& forms); | 59 const std::vector<webkit_glue::PasswordForm>& forms); |
58 virtual void PasswordFormsVisible( | 60 void OnPasswordFormsVisible( |
59 const std::vector<webkit_glue::PasswordForm>& visible_forms); | 61 const std::vector<webkit_glue::PasswordForm>& visible_forms); |
60 | 62 |
61 private: | 63 private: |
62 FRIEND_TEST_ALL_PREFIXES(PasswordManagerTest, FormSeenThenLeftPage); | 64 FRIEND_TEST_ALL_PREFIXES(PasswordManagerTest, FormSeenThenLeftPage); |
63 | 65 |
64 // Note about how a PasswordFormManager can transition from | 66 // Note about how a PasswordFormManager can transition from |
65 // pending_login_managers_ to provisional_save_manager_ and the infobar. | 67 // pending_login_managers_ to provisional_save_manager_ and the infobar. |
66 // | 68 // |
67 // 1. form "seen" | 69 // 1. form "seen" |
68 // | new | 70 // | new |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 LoginModelObserver* observer_; | 108 LoginModelObserver* observer_; |
107 | 109 |
108 // Set to false to disable the password manager (will no longer fill | 110 // Set to false to disable the password manager (will no longer fill |
109 // passwords or ask you if you want to save passwords). | 111 // passwords or ask you if you want to save passwords). |
110 BooleanPrefMember password_manager_enabled_; | 112 BooleanPrefMember password_manager_enabled_; |
111 | 113 |
112 DISALLOW_COPY_AND_ASSIGN(PasswordManager); | 114 DISALLOW_COPY_AND_ASSIGN(PasswordManager); |
113 }; | 115 }; |
114 | 116 |
115 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ | 117 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_H_ |
OLD | NEW |