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 1303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1314 loading_shield_->SetVisible(show_loading); | 1314 loading_shield_->SetVisible(show_loading); |
1315 Layout(); | 1315 Layout(); |
1316 } | 1316 } |
1317 | 1317 |
1318 // Update legal documents for the account. | 1318 // Update legal documents for the account. |
1319 if (footnote_view_) { | 1319 if (footnote_view_) { |
1320 const base::string16 text = delegate_->LegalDocumentsText(); | 1320 const base::string16 text = delegate_->LegalDocumentsText(); |
1321 legal_document_view_->SetText(text); | 1321 legal_document_view_->SetText(text); |
1322 | 1322 |
1323 if (!text.empty()) { | 1323 if (!text.empty()) { |
1324 const std::vector<ui::Range>& link_ranges = | 1324 const std::vector<gfx::Range>& link_ranges = |
1325 delegate_->LegalDocumentLinks(); | 1325 delegate_->LegalDocumentLinks(); |
1326 for (size_t i = 0; i < link_ranges.size(); ++i) { | 1326 for (size_t i = 0; i < link_ranges.size(); ++i) { |
1327 legal_document_view_->AddStyleRange( | 1327 legal_document_view_->AddStyleRange( |
1328 link_ranges[i], | 1328 link_ranges[i], |
1329 views::StyledLabel::RangeStyleInfo::CreateForLink()); | 1329 views::StyledLabel::RangeStyleInfo::CreateForLink()); |
1330 } | 1330 } |
1331 } | 1331 } |
1332 | 1332 |
1333 footnote_view_->SetVisible(!text.empty()); | 1333 footnote_view_->SetVisible(!text.empty()); |
1334 ContentsPreferredSizeChanged(); | 1334 ContentsPreferredSizeChanged(); |
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 focused_now->ScrollRectToVisible(focused_now->GetLocalBounds()); | 1720 focused_now->ScrollRectToVisible(focused_now->GetLocalBounds()); |
1721 ShowErrorBubbleForViewIfNecessary(focused_now); | 1721 ShowErrorBubbleForViewIfNecessary(focused_now); |
1722 } | 1722 } |
1723 } | 1723 } |
1724 | 1724 |
1725 void AutofillDialogViews::OnSelectedIndexChanged(views::Combobox* combobox) { | 1725 void AutofillDialogViews::OnSelectedIndexChanged(views::Combobox* combobox) { |
1726 DetailsGroup* group = GroupForView(combobox); | 1726 DetailsGroup* group = GroupForView(combobox); |
1727 ValidateGroup(*group, VALIDATE_EDIT); | 1727 ValidateGroup(*group, VALIDATE_EDIT); |
1728 } | 1728 } |
1729 | 1729 |
1730 void AutofillDialogViews::StyledLabelLinkClicked(const ui::Range& range, | 1730 void AutofillDialogViews::StyledLabelLinkClicked(const gfx::Range& range, |
1731 int event_flags) { | 1731 int event_flags) { |
1732 delegate_->LegalDocumentLinkClicked(range); | 1732 delegate_->LegalDocumentLinkClicked(range); |
1733 } | 1733 } |
1734 | 1734 |
1735 void AutofillDialogViews::OnMenuButtonClicked(views::View* source, | 1735 void AutofillDialogViews::OnMenuButtonClicked(views::View* source, |
1736 const gfx::Point& point) { | 1736 const gfx::Point& point) { |
1737 DCHECK_EQ(kSuggestedButtonClassName, source->GetClassName()); | 1737 DCHECK_EQ(kSuggestedButtonClassName, source->GetClassName()); |
1738 | 1738 |
1739 DetailsGroup* group = NULL; | 1739 DetailsGroup* group = NULL; |
1740 for (DetailGroupMap::iterator iter = detail_groups_.begin(); | 1740 for (DetailGroupMap::iterator iter = detail_groups_.begin(); |
(...skipping 615 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2356 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2356 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2357 : section(section), | 2357 : section(section), |
2358 container(NULL), | 2358 container(NULL), |
2359 manual_input(NULL), | 2359 manual_input(NULL), |
2360 suggested_info(NULL), | 2360 suggested_info(NULL), |
2361 suggested_button(NULL) {} | 2361 suggested_button(NULL) {} |
2362 | 2362 |
2363 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2363 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2364 | 2364 |
2365 } // namespace autofill | 2365 } // namespace autofill |
OLD | NEW |