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_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_ |
6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 namespace webkit_glue { | 9 namespace webkit { |
| 10 namespace forms { |
10 struct PasswordFormFillData; | 11 struct PasswordFormFillData; |
11 } // namespace webkit_glue | 12 } |
| 13 } |
12 | 14 |
13 class PasswordFormManager; | 15 class PasswordFormManager; |
14 class Profile; | 16 class Profile; |
15 | 17 |
16 // An abstraction of operations in the external environment (TabContents) | 18 // An abstraction of operations in the external environment (TabContents) |
17 // that the PasswordManager depends on. This allows for more targeted | 19 // that the PasswordManager depends on. This allows for more targeted |
18 // unit testing. | 20 // unit testing. |
19 class PasswordManagerDelegate { | 21 class PasswordManagerDelegate { |
20 public: | 22 public: |
21 PasswordManagerDelegate() {} | 23 PasswordManagerDelegate() {} |
22 virtual ~PasswordManagerDelegate() {} | 24 virtual ~PasswordManagerDelegate() {} |
23 | 25 |
24 // Fill forms matching |form_data| in |tab_contents|. By default, goes | 26 // Fill forms matching |form_data| in |tab_contents|. By default, goes |
25 // through the RenderViewHost to FillPasswordForm. Tests can override this | 27 // through the RenderViewHost to FillPasswordForm. Tests can override this |
26 // to sever the dependency on the entire rendering stack. | 28 // to sever the dependency on the entire rendering stack. |
27 virtual void FillPasswordForm( | 29 virtual void FillPasswordForm( |
28 const webkit_glue::PasswordFormFillData& form_data) = 0; | 30 const webkit::forms::PasswordFormFillData& form_data) = 0; |
29 | 31 |
30 // A mechanism to show an infobar in the current tab at our request. | 32 // A mechanism to show an infobar in the current tab at our request. |
31 virtual void AddSavePasswordInfoBar(PasswordFormManager* form_to_save) = 0; | 33 virtual void AddSavePasswordInfoBar(PasswordFormManager* form_to_save) = 0; |
32 | 34 |
33 // Get the profile for which we are managing passwords. | 35 // Get the profile for which we are managing passwords. |
34 virtual Profile* GetProfileForPasswordManager() = 0; | 36 virtual Profile* GetProfileForPasswordManager() = 0; |
35 | 37 |
36 // If any SSL certificate errors were encountered as a result of the last | 38 // If any SSL certificate errors were encountered as a result of the last |
37 // page load. | 39 // page load. |
38 virtual bool DidLastPageLoadEncounterSSLErrors() = 0; | 40 virtual bool DidLastPageLoadEncounterSSLErrors() = 0; |
39 | 41 |
40 private: | 42 private: |
41 DISALLOW_COPY_AND_ASSIGN(PasswordManagerDelegate); | 43 DISALLOW_COPY_AND_ASSIGN(PasswordManagerDelegate); |
42 }; | 44 }; |
43 | 45 |
44 | 46 |
45 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_ | 47 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_MANAGER_DELEGATE_H_ |
OLD | NEW |