| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_GENERATION_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
| 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ | 6 #define CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 | 77 |
| 78 // Hides any visible UI. | 78 // Hides any visible UI. |
| 79 void OnHidePasswordGenerationPopup(); | 79 void OnHidePasswordGenerationPopup(); |
| 80 | 80 |
| 81 private: | 81 private: |
| 82 friend class PasswordGenerationManagerTest; | 82 friend class PasswordGenerationManagerTest; |
| 83 | 83 |
| 84 // Determines current state of password generation | 84 // Determines current state of password generation |
| 85 bool IsGenerationEnabled() const; | 85 bool IsGenerationEnabled() const; |
| 86 | 86 |
| 87 // Sends a message to the renderer specifying form(s) that we should enable | |
| 88 // password generation on. This is a separate function to aid in testing. | |
| 89 virtual void SendAccountCreationFormsToRenderer( | |
| 90 content::RenderViewHost* host, | |
| 91 const std::vector<autofill::FormData>& forms); | |
| 92 | |
| 93 // Given |bounds| in the renderers coordinate system, return the same bounds | 87 // Given |bounds| in the renderers coordinate system, return the same bounds |
| 94 // in the screens coordinate system. | 88 // in the screens coordinate system. |
| 95 gfx::RectF GetBoundsInScreenSpace(const gfx::RectF& bounds); | 89 gfx::RectF GetBoundsInScreenSpace(const gfx::RectF& bounds); |
| 96 | 90 |
| 97 // The WebContents instance associated with this instance. Scoped to the | 91 // The WebContents instance associated with this instance. Scoped to the |
| 98 // lifetime of this class, as this class is indirectly a WCUD via | 92 // lifetime of this class, as this class is indirectly a WCUD via |
| 99 // ChromePasswordManagerClient. | 93 // ChromePasswordManagerClient. |
| 100 // TODO(blundell): Eliminate this ivar. crbug.com/340675 | 94 // TODO(blundell): Eliminate this ivar. crbug.com/340675 |
| 101 content::WebContents* web_contents_; | 95 content::WebContents* web_contents_; |
| 102 | 96 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 115 PasswordManagerClient* client_; | 109 PasswordManagerClient* client_; |
| 116 | 110 |
| 117 // The PasswordManagerDriver instance associated with this instance. Must | 111 // The PasswordManagerDriver instance associated with this instance. Must |
| 118 // outlive this instance. | 112 // outlive this instance. |
| 119 PasswordManagerDriver* driver_; | 113 PasswordManagerDriver* driver_; |
| 120 | 114 |
| 121 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); | 115 DISALLOW_COPY_AND_ASSIGN(PasswordGenerationManager); |
| 122 }; | 116 }; |
| 123 | 117 |
| 124 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ | 118 #endif // CHROME_BROWSER_PASSWORD_MANAGER_PASSWORD_GENERATION_MANAGER_H_ |
| OLD | NEW |