| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/autofill/autofill_dialog_views.h" | 5 #include "chrome/browser/ui/views/autofill/autofill_dialog_views.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 472 SetLayoutManager( | 472 SetLayoutManager( |
| 473 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, | 473 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, |
| 474 kAroundTextPadding)); | 474 kAroundTextPadding)); |
| 475 AddChildView(image_); | 475 AddChildView(image_); |
| 476 | 476 |
| 477 menu_button_->set_background(NULL); | 477 menu_button_->set_background(NULL); |
| 478 menu_button_->set_border(NULL); | 478 menu_button_->set_border(NULL); |
| 479 gfx::Insets insets = GetInsets(); | 479 gfx::Insets insets = GetInsets(); |
| 480 menu_button_->SetFocusPainter( | 480 menu_button_->SetFocusPainter( |
| 481 views::Painter::CreateDashedFocusPainterWithInsets(insets)); | 481 views::Painter::CreateDashedFocusPainterWithInsets(insets)); |
| 482 menu_button_->set_focusable(true); | 482 menu_button_->SetFocusable(true); |
| 483 AddChildView(menu_button_); | 483 AddChildView(menu_button_); |
| 484 | 484 |
| 485 link_->set_listener(this); | 485 link_->set_listener(this); |
| 486 AddChildView(link_); | 486 AddChildView(link_); |
| 487 } | 487 } |
| 488 | 488 |
| 489 AutofillDialogViews::AccountChooser::~AccountChooser() {} | 489 AutofillDialogViews::AccountChooser::~AccountChooser() {} |
| 490 | 490 |
| 491 void AutofillDialogViews::AccountChooser::Update() { | 491 void AutofillDialogViews::AccountChooser::Update() { |
| 492 SetVisible(delegate_->ShouldShowAccountChooser()); | 492 SetVisible(delegate_->ShouldShowAccountChooser()); |
| (...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 938 const int kFocusBorderWidth = 1; | 938 const int kFocusBorderWidth = 1; |
| 939 set_border(views::Border::CreateEmptyBorder(kMenuButtonTopInset, | 939 set_border(views::Border::CreateEmptyBorder(kMenuButtonTopInset, |
| 940 kDialogEdgePadding, | 940 kDialogEdgePadding, |
| 941 kMenuButtonBottomInset, | 941 kMenuButtonBottomInset, |
| 942 kFocusBorderWidth)); | 942 kFocusBorderWidth)); |
| 943 gfx::Insets insets = GetInsets(); | 943 gfx::Insets insets = GetInsets(); |
| 944 insets += gfx::Insets(-kFocusBorderWidth, -kFocusBorderWidth, | 944 insets += gfx::Insets(-kFocusBorderWidth, -kFocusBorderWidth, |
| 945 -kFocusBorderWidth, -kFocusBorderWidth); | 945 -kFocusBorderWidth, -kFocusBorderWidth); |
| 946 SetFocusPainter( | 946 SetFocusPainter( |
| 947 views::Painter::CreateDashedFocusPainterWithInsets(insets)); | 947 views::Painter::CreateDashedFocusPainterWithInsets(insets)); |
| 948 set_focusable(true); | 948 SetFocusable(true); |
| 949 } | 949 } |
| 950 | 950 |
| 951 AutofillDialogViews::SuggestedButton::~SuggestedButton() {} | 951 AutofillDialogViews::SuggestedButton::~SuggestedButton() {} |
| 952 | 952 |
| 953 gfx::Size AutofillDialogViews::SuggestedButton::GetPreferredSize() { | 953 gfx::Size AutofillDialogViews::SuggestedButton::GetPreferredSize() { |
| 954 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 954 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 955 gfx::Size size = rb.GetImageNamed(ResourceIDForState()).Size(); | 955 gfx::Size size = rb.GetImageNamed(ResourceIDForState()).Size(); |
| 956 const gfx::Insets insets = GetInsets(); | 956 const gfx::Insets insets = GetInsets(); |
| 957 size.Enlarge(insets.width(), insets.height()); | 957 size.Enlarge(insets.width(), insets.height()); |
| 958 return size; | 958 return size; |
| (...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2457 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2457 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
| 2458 : section(section), | 2458 : section(section), |
| 2459 container(NULL), | 2459 container(NULL), |
| 2460 manual_input(NULL), | 2460 manual_input(NULL), |
| 2461 suggested_info(NULL), | 2461 suggested_info(NULL), |
| 2462 suggested_button(NULL) {} | 2462 suggested_button(NULL) {} |
| 2463 | 2463 |
| 2464 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2464 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
| 2465 | 2465 |
| 2466 } // namespace autofill | 2466 } // namespace autofill |
| OLD | NEW |