| 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_icon.h" | 5 #include "chrome/browser/ui/passwords/manage_passwords_icon.h" |
| 6 | 6 |
| 7 ManagePasswordsIcon::ManagePasswordsIcon() | 7 ManagePasswordsIcon::ManagePasswordsIcon() |
| 8 : state_(password_manager::ui::INACTIVE_STATE) { | 8 : state_(password_manager::ui::INACTIVE_STATE), |
| 9 active_(false) { |
| 9 } | 10 } |
| 10 | 11 |
| 11 ManagePasswordsIcon::~ManagePasswordsIcon() { | 12 ManagePasswordsIcon::~ManagePasswordsIcon() { |
| 12 } | 13 } |
| 13 | 14 |
| 15 void ManagePasswordsIcon::SetActive(bool active) { |
| 16 if (active_ == active) |
| 17 return; |
| 18 active_ = active; |
| 19 UpdateVisibleUI(); |
| 20 } |
| 21 |
| 14 void ManagePasswordsIcon::SetState(password_manager::ui::State state) { | 22 void ManagePasswordsIcon::SetState(password_manager::ui::State state) { |
| 15 if (state_ == state) | 23 if (state_ == state) |
| 16 return; | 24 return; |
| 17 state_ = state; | 25 state_ = state; |
| 18 UpdateVisibleUI(); | 26 UpdateVisibleUI(); |
| 19 } | 27 } |
| OLD | NEW |