| 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) { | |
| 10 } | 9 } |
| 11 | 10 |
| 12 ManagePasswordsIcon::~ManagePasswordsIcon() { | 11 ManagePasswordsIcon::~ManagePasswordsIcon() { |
| 13 } | 12 } |
| 14 | 13 |
| 15 void ManagePasswordsIcon::SetActive(bool active) { | |
| 16 if (active_ == active) | |
| 17 return; | |
| 18 active_ = active; | |
| 19 UpdateVisibleUI(); | |
| 20 } | |
| 21 | |
| 22 void ManagePasswordsIcon::SetState(password_manager::ui::State state) { | 14 void ManagePasswordsIcon::SetState(password_manager::ui::State state) { |
| 23 if (state_ == state) | 15 if (state_ == state) |
| 24 return; | 16 return; |
| 25 state_ = state; | 17 state_ = state; |
| 26 UpdateVisibleUI(); | 18 UpdateVisibleUI(); |
| 27 } | 19 } |
| OLD | NEW |