OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/renderer/autofill/password_generation_manager.h" | 5 #include "chrome/renderer/autofill/password_generation_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/common/autofill_messages.h" | 8 #include "chrome/common/autofill_messages.h" |
9 #include "chrome/common/password_generation_util.h" | 9 #include "chrome/common/password_generation_util.h" |
10 #include "content/public/renderer/password_form_conversion_utils.h" | 10 #include "content/public/renderer/password_form_conversion_utils.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // to fill those. | 57 // to fill those. |
58 if (passwords->size() > 2) | 58 if (passwords->size() > 2) |
59 passwords->resize(2); | 59 passwords->resize(2); |
60 | 60 |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 return false; | 64 return false; |
65 } | 65 } |
66 | 66 |
67 } // namespace | 67 } // namespace |
68 | 68 |
69 PasswordGenerationManager::PasswordGenerationManager( | 69 PasswordGenerationManager::PasswordGenerationManager( |
70 content::RenderView* render_view) | 70 content::RenderView* render_view) |
71 : content::RenderViewObserver(render_view), | 71 : content::RenderViewObserver(render_view), |
72 render_view_(render_view), | 72 render_view_(render_view), |
73 enabled_(false) { | 73 enabled_(false) { |
74 render_view_->GetWebView()->addTextFieldDecoratorClient(this); | 74 render_view_->GetWebView()->addTextFieldDecoratorClient(this); |
75 } | 75 } |
76 PasswordGenerationManager::~PasswordGenerationManager() {} | 76 PasswordGenerationManager::~PasswordGenerationManager() {} |
77 | 77 |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 passwords_[0].decorationElementFor(this).setAttribute("style", | 247 passwords_[0].decorationElementFor(this).setAttribute("style", |
248 "display:block"); | 248 "display:block"); |
249 password_generation::LogPasswordGenerationEvent( | 249 password_generation::LogPasswordGenerationEvent( |
250 password_generation::ICON_SHOWN); | 250 password_generation::ICON_SHOWN); |
251 return; | 251 return; |
252 } | 252 } |
253 } | 253 } |
254 } | 254 } |
255 | 255 |
256 } // namespace autofill | 256 } // namespace autofill |
OLD | NEW |