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 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 // Ownership of |contents_| is handed off by this call. The widget will take | 1244 // Ownership of |contents_| is handed off by this call. The widget will take |
1245 // care of deleting itself after calling DeleteDelegate(). | 1245 // care of deleting itself after calling DeleteDelegate(). |
1246 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 1246 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
1247 WebContentsModalDialogManager::FromWebContents( | 1247 WebContentsModalDialogManager::FromWebContents( |
1248 delegate_->GetWebContents()); | 1248 delegate_->GetWebContents()); |
1249 WebContentsModalDialogManagerDelegate* modal_delegate = | 1249 WebContentsModalDialogManagerDelegate* modal_delegate = |
1250 web_contents_modal_dialog_manager->delegate(); | 1250 web_contents_modal_dialog_manager->delegate(); |
1251 DCHECK(modal_delegate); | 1251 DCHECK(modal_delegate); |
1252 window_ = views::Widget::CreateWindowAsFramelessChild( | 1252 window_ = views::Widget::CreateWindowAsFramelessChild( |
1253 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | 1253 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
1254 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); | 1254 web_contents_modal_dialog_manager->ShowModalDialog( |
| 1255 window_->GetNativeView()); |
1255 focus_manager_ = window_->GetFocusManager(); | 1256 focus_manager_ = window_->GetFocusManager(); |
1256 focus_manager_->AddFocusChangeListener(this); | 1257 focus_manager_->AddFocusChangeListener(this); |
1257 | 1258 |
1258 ShowDialogInMode(DETAIL_INPUT); | 1259 ShowDialogInMode(DETAIL_INPUT); |
1259 | 1260 |
1260 // Listen for size changes on the browser. | 1261 // Listen for size changes on the browser. |
1261 views::Widget* browser_widget = | 1262 views::Widget* browser_widget = |
1262 views::Widget::GetTopLevelWidgetForNativeView( | 1263 views::Widget::GetTopLevelWidgetForNativeView( |
1263 delegate_->GetWebContents()->GetView()->GetNativeView()); | 1264 delegate_->GetWebContents()->GetView()->GetNativeView()); |
1264 observer_.Add(browser_widget); | 1265 observer_.Add(browser_widget); |
(...skipping 1246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2511 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2512 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2512 : section(section), | 2513 : section(section), |
2513 container(NULL), | 2514 container(NULL), |
2514 manual_input(NULL), | 2515 manual_input(NULL), |
2515 suggested_info(NULL), | 2516 suggested_info(NULL), |
2516 suggested_button(NULL) {} | 2517 suggested_button(NULL) {} |
2517 | 2518 |
2518 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2519 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2519 | 2520 |
2520 } // namespace autofill | 2521 } // namespace autofill |
OLD | NEW |