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/i18n/rtl.h" | 9 #include "base/i18n/rtl.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 } | 372 } |
373 | 373 |
374 void AutofillDialogViews::Show() { | 374 void AutofillDialogViews::Show() { |
375 InitChildViews(); | 375 InitChildViews(); |
376 UpdateAccountChooser(); | 376 UpdateAccountChooser(); |
377 UpdateNotificationArea(); | 377 UpdateNotificationArea(); |
378 | 378 |
379 // Ownership of |contents_| is handed off by this call. The | 379 // Ownership of |contents_| is handed off by this call. The |
380 // WebContentsModalDialog will take care of deleting itself after calling | 380 // WebContentsModalDialog will take care of deleting itself after calling |
381 // DeleteDelegate(). | 381 // DeleteDelegate(). |
382 window_ = new ConstrainedWindowViews(controller_->web_contents(), this); | 382 window_ = ConstrainedWindowViews::Create(controller_->web_contents(), this); |
383 focus_manager_ = window_->GetFocusManager(); | 383 focus_manager_ = window_->GetFocusManager(); |
384 focus_manager_->AddFocusChangeListener(this); | 384 focus_manager_->AddFocusChangeListener(this); |
385 } | 385 } |
386 | 386 |
387 void AutofillDialogViews::Hide() { | 387 void AutofillDialogViews::Hide() { |
388 if (window_) | 388 if (window_) |
389 window_->CloseWebContentsModalDialog(); | 389 window_->CloseWebContentsModalDialog(); |
390 } | 390 } |
391 | 391 |
392 void AutofillDialogViews::UpdateAccountChooser() { | 392 void AutofillDialogViews::UpdateAccountChooser() { |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 936 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
937 : section(section), | 937 : section(section), |
938 container(NULL), | 938 container(NULL), |
939 manual_input(NULL), | 939 manual_input(NULL), |
940 suggested_info(NULL), | 940 suggested_info(NULL), |
941 suggested_button(NULL) {} | 941 suggested_button(NULL) {} |
942 | 942 |
943 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 943 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
944 | 944 |
945 } // namespace autofill | 945 } // namespace autofill |
OLD | NEW |