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

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

Issue 1802073002: Makes vertical alignment of location bar bubbles same (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 760 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 ManagePasswordsBubbleView::ManagePasswordsBubbleView( 772 ManagePasswordsBubbleView::ManagePasswordsBubbleView(
773 content::WebContents* web_contents, 773 content::WebContents* web_contents,
774 views::View* anchor_view, 774 views::View* anchor_view,
775 DisplayReason reason) 775 DisplayReason reason)
776 : LocationBarBubbleDelegateView(anchor_view, web_contents), 776 : LocationBarBubbleDelegateView(anchor_view, web_contents),
777 model_(web_contents, 777 model_(web_contents,
778 reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC 778 reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC
779 : ManagePasswordsBubbleModel::USER_ACTION), 779 : ManagePasswordsBubbleModel::USER_ACTION),
780 initially_focused_view_(nullptr) { 780 initially_focused_view_(nullptr) {
781 // Compensate for built-in vertical padding in the anchor view's image.
782 set_anchor_view_insets(gfx::Insets(5, 0, 5, 0));
783
784 mouse_handler_.reset(new WebContentMouseHandler(this)); 781 mouse_handler_.reset(new WebContentMouseHandler(this));
785 } 782 }
786 783
787 ManagePasswordsBubbleView::~ManagePasswordsBubbleView() { 784 ManagePasswordsBubbleView::~ManagePasswordsBubbleView() {
788 if (manage_passwords_bubble_ == this) 785 if (manage_passwords_bubble_ == this)
789 manage_passwords_bubble_ = NULL; 786 manage_passwords_bubble_ = NULL;
790 } 787 }
791 788
792 views::View* ManagePasswordsBubbleView::GetInitiallyFocusedView() { 789 views::View* ManagePasswordsBubbleView::GetInitiallyFocusedView() {
793 return initially_focused_view_; 790 return initially_focused_view_;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
832 AddChildView(new SaveConfirmationView(this)); 829 AddChildView(new SaveConfirmationView(this));
833 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) { 830 } else if (model_.state() == password_manager::ui::AUTO_SIGNIN_STATE) {
834 AddChildView(new AutoSigninView(this)); 831 AddChildView(new AutoSigninView(this));
835 } else { 832 } else {
836 AddChildView(new ManageView(this)); 833 AddChildView(new ManageView(this));
837 } 834 }
838 if (GetWidget()) 835 if (GetWidget())
839 GetWidget()->UpdateWindowTitle(); 836 GetWidget()->UpdateWindowTitle();
840 GetLayoutManager()->Layout(this); 837 GetLayoutManager()->Layout(this);
841 } 838 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698