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