| 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 COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 5 #ifndef COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ |
| 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ | 6 #define COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_DRI
VER_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "components/autofill/core/common/password_form_field_prediction_map.h" | 10 #include "components/autofill/core/common/password_form_field_prediction_map.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 struct LoadCommittedDetails; | 23 struct LoadCommittedDetails; |
| 24 class RenderFrameHost; | 24 class RenderFrameHost; |
| 25 class WebContents; | 25 class WebContents; |
| 26 } | 26 } |
| 27 | 27 |
| 28 namespace IPC { | 28 namespace IPC { |
| 29 class Message; | 29 class Message; |
| 30 } | 30 } |
| 31 | 31 |
| 32 namespace password_manager { | 32 namespace password_manager { |
| 33 namespace bad_message { |
| 34 enum class BadMessageReason; |
| 35 } |
| 33 | 36 |
| 34 // There is one ContentPasswordManagerDriver per RenderFrameHost. | 37 // There is one ContentPasswordManagerDriver per RenderFrameHost. |
| 35 // The lifetime is managed by the ContentPasswordManagerDriverFactory. | 38 // The lifetime is managed by the ContentPasswordManagerDriverFactory. |
| 36 class ContentPasswordManagerDriver : public PasswordManagerDriver { | 39 class ContentPasswordManagerDriver : public PasswordManagerDriver { |
| 37 public: | 40 public: |
| 38 ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host, | 41 ContentPasswordManagerDriver(content::RenderFrameHost* render_frame_host, |
| 39 PasswordManagerClient* client, | 42 PasswordManagerClient* client, |
| 40 autofill::AutofillClient* autofill_client); | 43 autofill::AutofillClient* autofill_client); |
| 41 ~ContentPasswordManagerDriver() override; | 44 ~ContentPasswordManagerDriver() override; |
| 42 | 45 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); | 78 void OnPasswordFormsParsed(const std::vector<autofill::PasswordForm>& forms); |
| 76 void OnPasswordFormsRendered( | 79 void OnPasswordFormsRendered( |
| 77 const std::vector<autofill::PasswordForm>& visible_forms, | 80 const std::vector<autofill::PasswordForm>& visible_forms, |
| 78 bool did_stop_loading); | 81 bool did_stop_loading); |
| 79 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); | 82 void OnPasswordFormSubmitted(const autofill::PasswordForm& password_form); |
| 80 void OnInPageNavigation(const autofill::PasswordForm& password_form); | 83 void OnInPageNavigation(const autofill::PasswordForm& password_form); |
| 81 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); | 84 void OnPasswordNoLongerGenerated(const autofill::PasswordForm& password_form); |
| 82 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form); | 85 void OnFocusedPasswordFormFound(const autofill::PasswordForm& password_form); |
| 83 | 86 |
| 84 private: | 87 private: |
| 88 bool CheckChildProcessSecurityPolicy(const GURL& url, |
| 89 bad_message::BadMessageReason); |
| 90 |
| 85 content::RenderFrameHost* render_frame_host_; | 91 content::RenderFrameHost* render_frame_host_; |
| 86 PasswordManagerClient* client_; | 92 PasswordManagerClient* client_; |
| 87 PasswordGenerationManager password_generation_manager_; | 93 PasswordGenerationManager password_generation_manager_; |
| 88 PasswordAutofillManager password_autofill_manager_; | 94 PasswordAutofillManager password_autofill_manager_; |
| 89 | 95 |
| 90 // Every instance of PasswordFormFillData created by |*this| and sent to | 96 // Every instance of PasswordFormFillData created by |*this| and sent to |
| 91 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that | 97 // PasswordAutofillManager and PasswordAutofillAgent is given an ID, so that |
| 92 // the latter two classes can reference to the same instance without sending | 98 // the latter two classes can reference to the same instance without sending |
| 93 // it to each other over IPC. The counter below is used to generate new IDs. | 99 // it to each other over IPC. The counter below is used to generate new IDs. |
| 94 int next_free_key_; | 100 int next_free_key_; |
| 95 | 101 |
| 96 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); | 102 DISALLOW_COPY_AND_ASSIGN(ContentPasswordManagerDriver); |
| 97 }; | 103 }; |
| 98 | 104 |
| 99 } // namespace password_manager | 105 } // namespace password_manager |
| 100 | 106 |
| 101 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ | 107 #endif // COMPONENTS_PASSWORD_MANAGER_CONTENT_BROWSER_CONTENT_PASSWORD_MANAGER_
DRIVER_H_ |
| OLD | NEW |