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

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

Issue 2773733002: Fix Password bubble title misalignment. (Closed)
Patch Set: mac fix Created 3 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
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h ('k') | 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"
11 #include "chrome/browser/ui/browser.h" 11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/browser/ui/browser_finder.h" 12 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h" 13 #include "chrome/browser/ui/exclusive_access/fullscreen_controller.h"
14 #include "chrome/browser/ui/passwords/password_dialog_prompts.h" 14 #include "chrome/browser/ui/passwords/password_dialog_prompts.h"
15 #include "chrome/browser/ui/passwords/passwords_model_delegate.h" 15 #include "chrome/browser/ui/passwords/passwords_model_delegate.h"
16 #include "chrome/browser/ui/views/frame/browser_view.h" 16 #include "chrome/browser/ui/views/frame/browser_view.h"
17 #include "chrome/browser/ui/views/harmony/layout_delegate.h"
17 #include "chrome/browser/ui/views/passwords/credentials_item_view.h" 18 #include "chrome/browser/ui/views/passwords/credentials_item_view.h"
18 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h" 19 #include "chrome/browser/ui/views/passwords/credentials_selection_view.h"
19 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h" 20 #include "chrome/browser/ui/views/passwords/manage_password_items_view.h"
20 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h" 21 #include "chrome/browser/ui/views/passwords/manage_passwords_icon_views.h"
21 #include "chrome/grit/generated_resources.h" 22 #include "chrome/grit/generated_resources.h"
22 #include "components/strings/grit/components_strings.h" 23 #include "components/strings/grit/components_strings.h"
23 #include "content/public/browser/user_metrics.h" 24 #include "content/public/browser/user_metrics.h"
24 #include "ui/base/l10n/l10n_util.h" 25 #include "ui/base/l10n/l10n_util.h"
25 #include "ui/base/material_design/material_design_controller.h" 26 #include "ui/base/material_design/material_design_controller.h"
26 #include "ui/base/resource/resource_bundle.h" 27 #include "ui/base/resource/resource_bundle.h"
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 ManagePasswordsBubbleView::ManagePasswordsBubbleView( 761 ManagePasswordsBubbleView::ManagePasswordsBubbleView(
761 content::WebContents* web_contents, 762 content::WebContents* web_contents,
762 views::View* anchor_view, 763 views::View* anchor_view,
763 DisplayReason reason) 764 DisplayReason reason)
764 : LocationBarBubbleDelegateView(anchor_view, web_contents), 765 : LocationBarBubbleDelegateView(anchor_view, web_contents),
765 model_(PasswordsModelDelegateFromWebContents(web_contents), 766 model_(PasswordsModelDelegateFromWebContents(web_contents),
766 reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC 767 reason == AUTOMATIC ? ManagePasswordsBubbleModel::AUTOMATIC
767 : ManagePasswordsBubbleModel::USER_ACTION), 768 : ManagePasswordsBubbleModel::USER_ACTION),
768 initially_focused_view_(nullptr) { 769 initially_focused_view_(nullptr) {
769 mouse_handler_.reset(new WebContentMouseHandler(this, this->web_contents())); 770 mouse_handler_.reset(new WebContentMouseHandler(this, this->web_contents()));
771 // Set title margins to make the title and the content to be left aligned.
vasilii 2017/03/24 13:23:30 to make the title and the content left aligned.
dvadym 2017/03/24 13:32:34 Done.
772 const int side_margin = margins().left();
773 set_title_margins(
774 gfx::Insets(LayoutDelegate::Get()->GetMetric(
775 LayoutDelegate::Metric::PANEL_CONTENT_MARGIN),
776 side_margin, 0, side_margin));
770 } 777 }
771 778
772 ManagePasswordsBubbleView::~ManagePasswordsBubbleView() { 779 ManagePasswordsBubbleView::~ManagePasswordsBubbleView() {
773 if (manage_passwords_bubble_ == this) 780 if (manage_passwords_bubble_ == this)
774 manage_passwords_bubble_ = NULL; 781 manage_passwords_bubble_ = NULL;
775 } 782 }
776 783
777 views::View* ManagePasswordsBubbleView::GetInitiallyFocusedView() { 784 views::View* ManagePasswordsBubbleView::GetInitiallyFocusedView() {
778 return initially_focused_view_; 785 return initially_focused_view_;
779 } 786 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 } else if (model_.state() == 857 } else if (model_.state() ==
851 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) { 858 password_manager::ui::CHROME_DESKTOP_IOS_PROMO_STATE) {
852 AddChildView(new DesktopIOSPromotionBubbleView( 859 AddChildView(new DesktopIOSPromotionBubbleView(
853 model_.GetProfile(), 860 model_.GetProfile(),
854 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE)); 861 desktop_ios_promotion::PromotionEntryPoint::SAVE_PASSWORD_BUBBLE));
855 #endif 862 #endif
856 } else { 863 } else {
857 AddChildView(new ManageView(this)); 864 AddChildView(new ManageView(this));
858 } 865 }
859 } 866 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/passwords/passwords_bubble_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698