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 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_ui_controller.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "chrome/app/chrome_command_ids.h" | 8 #include "chrome/app/chrome_command_ids.h" |
9 #include "chrome/browser/browsing_data/browsing_data_helper.h" | 9 #include "chrome/browser/browsing_data/browsing_data_helper.h" |
10 #include "chrome/browser/password_manager/chrome_password_manager_client.h" | 10 #include "chrome/browser/password_manager/chrome_password_manager_client.h" |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 } | 143 } |
144 | 144 |
145 void ManagePasswordsUIController::OnPasswordAutofilled( | 145 void ManagePasswordsUIController::OnPasswordAutofilled( |
146 const PasswordFormMap& password_form_map) { | 146 const PasswordFormMap& password_form_map) { |
147 passwords_data_.OnPasswordAutofilled(password_form_map); | 147 passwords_data_.OnPasswordAutofilled(password_form_map); |
148 UpdateBubbleAndIconVisibility(); | 148 UpdateBubbleAndIconVisibility(); |
149 } | 149 } |
150 | 150 |
151 void ManagePasswordsUIController::OnBlacklistBlockedAutofill( | 151 void ManagePasswordsUIController::OnBlacklistBlockedAutofill( |
152 const PasswordFormMap& password_form_map) { | 152 const PasswordFormMap& password_form_map) { |
153 passwords_data_.OnBlacklistBlockedAutofill(password_form_map); | 153 passwords_data_.OnInactive(); |
154 UpdateBubbleAndIconVisibility(); | 154 UpdateBubbleAndIconVisibility(); |
155 } | 155 } |
156 | 156 |
157 void ManagePasswordsUIController::OnLoginsChanged( | 157 void ManagePasswordsUIController::OnLoginsChanged( |
158 const password_manager::PasswordStoreChangeList& changes) { | 158 const password_manager::PasswordStoreChangeList& changes) { |
159 password_manager::ui::State current_state = state(); | 159 password_manager::ui::State current_state = state(); |
160 passwords_data_.ProcessLoginsChanged(changes); | 160 passwords_data_.ProcessLoginsChanged(changes); |
161 if (current_state != state()) | 161 if (current_state != state()) |
162 UpdateBubbleAndIconVisibility(); | 162 UpdateBubbleAndIconVisibility(); |
163 } | 163 } |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); | 364 updater->ExecuteCommand(IDC_MANAGE_PASSWORDS_FOR_PAGE); |
365 #endif | 365 #endif |
366 } | 366 } |
367 | 367 |
368 void ManagePasswordsUIController::WebContentsDestroyed() { | 368 void ManagePasswordsUIController::WebContentsDestroyed() { |
369 password_manager::PasswordStore* password_store = | 369 password_manager::PasswordStore* password_store = |
370 GetPasswordStore(web_contents()); | 370 GetPasswordStore(web_contents()); |
371 if (password_store) | 371 if (password_store) |
372 password_store->RemoveObserver(this); | 372 password_store->RemoveObserver(this); |
373 } | 373 } |
OLD | NEW |