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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 21692002: Rename AutofillDialogController to AutofillDialogViewDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 4 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 | Annotate | Revision Log
OLDNEW
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/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
11 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
12 #include "chrome/browser/ui/autofill/autofill_dialog_controller.h"
13 #include "chrome/browser/ui/autofill/autofill_dialog_sign_in_delegate.h" 12 #include "chrome/browser/ui/autofill/autofill_dialog_sign_in_delegate.h"
13 #include "chrome/browser/ui/autofill/autofill_dialog_view_delegate.h"
14 #include "chrome/browser/ui/views/autofill/decorated_textfield.h" 14 #include "chrome/browser/ui/views/autofill/decorated_textfield.h"
15 #include "chrome/browser/ui/views/constrained_window_views.h" 15 #include "chrome/browser/ui/views/constrained_window_views.h"
16 #include "components/autofill/content/browser/wallet/wallet_service_url.h" 16 #include "components/autofill/content/browser/wallet/wallet_service_url.h"
17 #include "components/autofill/core/browser/autofill_type.h" 17 #include "components/autofill/core/browser/autofill_type.h"
18 #include "components/web_modal/web_contents_modal_dialog_manager.h" 18 #include "components/web_modal/web_contents_modal_dialog_manager.h"
19 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h" 19 #include "components/web_modal/web_contents_modal_dialog_manager_delegate.h"
20 #include "content/public/browser/native_web_keyboard_event.h" 20 #include "content/public/browser/native_web_keyboard_event.h"
21 #include "content/public/browser/navigation_controller.h" 21 #include "content/public/browser/navigation_controller.h"
22 #include "content/public/browser/web_contents.h" 22 #include "content/public/browser/web_contents.h"
23 #include "content/public/browser/web_contents_view.h" 23 #include "content/public/browser/web_contents_view.h"
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 (anchor_bounds.width() + bubble_bounds.width()) / 2); 484 (anchor_bounds.width() + bubble_bounds.width()) / 2);
485 const int kErrorBubbleOverlap = 3; 485 const int kErrorBubbleOverlap = 3;
486 bubble_bounds.set_y(anchor_bounds.bottom() - kErrorBubbleOverlap); 486 bubble_bounds.set_y(anchor_bounds.bottom() - kErrorBubbleOverlap);
487 487
488 return bubble_bounds; 488 return bubble_bounds;
489 } 489 }
490 490
491 // AutofillDialogViews::AccountChooser ----------------------------------------- 491 // AutofillDialogViews::AccountChooser -----------------------------------------
492 492
493 AutofillDialogViews::AccountChooser::AccountChooser( 493 AutofillDialogViews::AccountChooser::AccountChooser(
494 AutofillDialogController* controller) 494 AutofillDialogViewDelegate* controller)
495 : image_(new views::ImageView()), 495 : image_(new views::ImageView()),
496 label_(new views::Label()), 496 label_(new views::Label()),
497 arrow_(new views::ImageView()), 497 arrow_(new views::ImageView()),
498 link_(new views::Link()), 498 link_(new views::Link()),
499 controller_(controller) { 499 controller_(controller) {
500 SetLayoutManager( 500 SetLayoutManager(
501 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0, 501 new views::BoxLayout(views::BoxLayout::kHorizontal, 0, 0,
502 kAroundTextPadding)); 502 kAroundTextPadding));
503 AddChildView(image_); 503 AddChildView(image_);
504 AddChildView(label_); 504 AddChildView(label_);
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 int bubble_width = 5; 771 int bubble_width = 5;
772 if (GetBubbleBorder()) 772 if (GetBubbleBorder())
773 bubble_width = GetBubbleBorder()->GetBorderThickness(); 773 bubble_width = GetBubbleBorder()->GetBorderThickness();
774 bounds.Inset(bubble_width, bubble_width, bubble_width, bubble_width); 774 bounds.Inset(bubble_width, bubble_width, bubble_width, bubble_width);
775 return bounds; 775 return bounds;
776 } 776 }
777 777
778 // AutofillDialogViews::NotificationArea --------------------------------------- 778 // AutofillDialogViews::NotificationArea ---------------------------------------
779 779
780 AutofillDialogViews::NotificationArea::NotificationArea( 780 AutofillDialogViews::NotificationArea::NotificationArea(
781 AutofillDialogController* controller) 781 AutofillDialogViewDelegate* controller)
782 : controller_(controller), 782 : controller_(controller),
783 checkbox_(NULL) { 783 checkbox_(NULL) {
784 // Reserve vertical space for the arrow (regardless of whether one exists). 784 // Reserve vertical space for the arrow (regardless of whether one exists).
785 // The -1 accounts for the border. 785 // The -1 accounts for the border.
786 set_border(views::Border::CreateEmptyBorder(kArrowHeight - 1, 0, 0, 0)); 786 set_border(views::Border::CreateEmptyBorder(kArrowHeight - 1, 0, 0, 0));
787 787
788 views::BoxLayout* box_layout = 788 views::BoxLayout* box_layout =
789 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0); 789 new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0);
790 SetLayoutManager(box_layout); 790 SetLayoutManager(box_layout);
791 } 791 }
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 1090
1091 gfx::Size AutofillDialogViews::AutocheckoutProgressBar::GetPreferredSize() { 1091 gfx::Size AutofillDialogViews::AutocheckoutProgressBar::GetPreferredSize() {
1092 return gfx::Size(kAutocheckoutProgressBarWidth, 1092 return gfx::Size(kAutocheckoutProgressBarWidth,
1093 kAutocheckoutProgressBarHeight); 1093 kAutocheckoutProgressBarHeight);
1094 } 1094 }
1095 1095
1096 // AutofillDialogView ---------------------------------------------------------- 1096 // AutofillDialogView ----------------------------------------------------------
1097 1097
1098 // static 1098 // static
1099 AutofillDialogView* AutofillDialogView::Create( 1099 AutofillDialogView* AutofillDialogView::Create(
1100 AutofillDialogController* controller) { 1100 AutofillDialogViewDelegate* controller) {
1101 return new AutofillDialogViews(controller); 1101 return new AutofillDialogViews(controller);
1102 } 1102 }
1103 1103
1104 // AutofillDialogViews --------------------------------------------------------- 1104 // AutofillDialogViews ---------------------------------------------------------
1105 1105
1106 AutofillDialogViews::AutofillDialogViews(AutofillDialogController* controller) 1106 AutofillDialogViews::AutofillDialogViews(AutofillDialogViewDelegate* controller)
1107 : controller_(controller), 1107 : controller_(controller),
1108 window_(NULL), 1108 window_(NULL),
1109 notification_area_(NULL), 1109 notification_area_(NULL),
1110 account_chooser_(NULL), 1110 account_chooser_(NULL),
1111 sign_in_webview_(NULL), 1111 sign_in_webview_(NULL),
1112 scrollable_area_(NULL), 1112 scrollable_area_(NULL),
1113 details_container_(NULL), 1113 details_container_(NULL),
1114 loading_shield_(NULL), 1114 loading_shield_(NULL),
1115 overlay_view_(NULL), 1115 overlay_view_(NULL),
1116 button_strip_extra_view_(NULL), 1116 button_strip_extra_view_(NULL),
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) 2267 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section)
2268 : section(section), 2268 : section(section),
2269 container(NULL), 2269 container(NULL),
2270 manual_input(NULL), 2270 manual_input(NULL),
2271 suggested_info(NULL), 2271 suggested_info(NULL),
2272 suggested_button(NULL) {} 2272 suggested_button(NULL) {}
2273 2273
2274 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} 2274 AutofillDialogViews::DetailsGroup::~DetailsGroup() {}
2275 2275
2276 } // namespace autofill 2276 } // namespace autofill
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698