| 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 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" | 5 #include "chrome/browser/ui/views/passwords/manage_passwords_bubble_view.h" |
| 6 | 6 |
| 7 #include "base/macros.h" | 7 #include "base/macros.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 void ManagePasswordsBubbleView::PendingView::StyledLabelLinkClicked( | 368 void ManagePasswordsBubbleView::PendingView::StyledLabelLinkClicked( |
| 369 views::StyledLabel* label, | 369 views::StyledLabel* label, |
| 370 const gfx::Range& range, | 370 const gfx::Range& range, |
| 371 int event_flags) { | 371 int event_flags) { |
| 372 DCHECK_EQ(range, parent_->model()->title_brand_link_range()); | 372 DCHECK_EQ(range, parent_->model()->title_brand_link_range()); |
| 373 parent_->model()->OnBrandLinkClicked(); | 373 parent_->model()->OnBrandLinkClicked(); |
| 374 } | 374 } |
| 375 | 375 |
| 376 // ManagePasswordsBubbleView::ManageView -------------------------------------- | 376 // ManagePasswordsBubbleView::ManageView -------------------------------------- |
| 377 | 377 |
| 378 // A view offering the user a list of her currently saved credentials | 378 // A view offering the user a list of their currently saved credentials |
| 379 // for the current page, along with a "Manage passwords" link and a | 379 // for the current page, along with a "Manage passwords" link and a |
| 380 // "Done" button. | 380 // "Done" button. |
| 381 class ManagePasswordsBubbleView::ManageView : public views::View, | 381 class ManagePasswordsBubbleView::ManageView : public views::View, |
| 382 public views::ButtonListener, | 382 public views::ButtonListener, |
| 383 public views::LinkListener { | 383 public views::LinkListener { |
| 384 public: | 384 public: |
| 385 explicit ManageView(ManagePasswordsBubbleView* parent); | 385 explicit ManageView(ManagePasswordsBubbleView* parent); |
| 386 ~ManageView() override; | 386 ~ManageView() override; |
| 387 | 387 |
| 388 private: | 388 private: |
| (...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 AddChildView(new SaveConfirmationView(this)); | 839 AddChildView(new SaveConfirmationView(this)); |
| 840 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { | 840 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { |
| 841 AddChildView(new AutoSigninView(this)); | 841 AddChildView(new AutoSigninView(this)); |
| 842 } else if (model_.state() == | 842 } else if (model_.state() == |
| 843 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { | 843 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { |
| 844 AddChildView(new SignInPromoView(this)); | 844 AddChildView(new SignInPromoView(this)); |
| 845 } else { | 845 } else { |
| 846 AddChildView(new ManageView(this)); | 846 AddChildView(new ManageView(this)); |
| 847 } | 847 } |
| 848 } | 848 } |
| OLD | NEW |