Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: chrome/browser/ui/views/passwords/manage_passwords_bubble_view.cc

Issue 2109673002: Add 'x' button to the signin promo in the password bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 808 }
809 809
810 bool ManagePasswordsBubbleView::ShouldShowWindowTitle() const { 810 bool ManagePasswordsBubbleView::ShouldShowWindowTitle() const {
811 // Since bubble titles don't support links, fall back to a custom title view 811 // Since bubble titles don't support links, fall back to a custom title view
812 // if we need to show a link. Only use the normal title path if there's no 812 // if we need to show a link. Only use the normal title path if there's no
813 // link. 813 // link.
814 return model_.title_brand_link_range().is_empty(); 814 return model_.title_brand_link_range().is_empty();
815 } 815 }
816 816
817 bool ManagePasswordsBubbleView::ShouldShowCloseButton() const { 817 bool ManagePasswordsBubbleView::ShouldShowCloseButton() const {
818 return model_.state() == password_manager::ui::PENDING_PASSWORD_STATE; 818 return model_.state() == password_manager::ui::PENDING_PASSWORD_STATE ||
819 model_.state() == password_manager::ui::CHROME_SIGN_IN_PROMO_STATE;
819 } 820 }
820 821
821 void ManagePasswordsBubbleView::Refresh() { 822 void ManagePasswordsBubbleView::Refresh() {
822 RemoveAllChildViews(true); 823 RemoveAllChildViews(true);
823 initially_focused_view_ = NULL; 824 initially_focused_view_ = NULL;
824 CreateChild(); 825 CreateChild();
825 826
826 // Show/hide the close button. 827 // Show/hide the close button.
827 GetWidget()->non_client_view()->ResetWindowControls(); 828 GetWidget()->non_client_view()->ResetWindowControls();
828 GetWidget()->UpdateWindowTitle(); 829 GetWidget()->UpdateWindowTitle();
(...skipping 10 matching lines...) Expand all
839 AddChildView(new SaveConfirmationView(this)); 840 AddChildView(new SaveConfirmationView(this));
840 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { 841 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) {
841 AddChildView(new AutoSigninView(this)); 842 AddChildView(new AutoSigninView(this));
842 } else if (model_.state() == 843 } else if (model_.state() ==
843 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) { 844 password_manager::ui::CHROME_SIGN_IN_PROMO_STATE) {
844 AddChildView(new SignInPromoView(this)); 845 AddChildView(new SignInPromoView(this));
845 } else { 846 } else {
846 AddChildView(new ManageView(this)); 847 AddChildView(new ManageView(this));
847 } 848 }
848 } 849 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698