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 1178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1189 UpdateButtonStripExtraView(); | 1189 UpdateButtonStripExtraView(); |
1190 | 1190 |
1191 // Ownership of |contents_| is handed off by this call. The widget will take | 1191 // Ownership of |contents_| is handed off by this call. The widget will take |
1192 // care of deleting itself after calling DeleteDelegate(). | 1192 // care of deleting itself after calling DeleteDelegate(). |
1193 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 1193 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
1194 WebContentsModalDialogManager::FromWebContents( | 1194 WebContentsModalDialogManager::FromWebContents( |
1195 delegate_->GetWebContents()); | 1195 delegate_->GetWebContents()); |
1196 WebContentsModalDialogManagerDelegate* modal_delegate = | 1196 WebContentsModalDialogManagerDelegate* modal_delegate = |
1197 web_contents_modal_dialog_manager->delegate(); | 1197 web_contents_modal_dialog_manager->delegate(); |
1198 DCHECK(modal_delegate); | 1198 DCHECK(modal_delegate); |
1199 | |
1200 window_ = views::Widget::CreateWindowAsFramelessChild( | 1199 window_ = views::Widget::CreateWindowAsFramelessChild( |
1201 this, | 1200 this, modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); |
1202 delegate_->GetWebContents()->GetView()->GetNativeView(), | |
1203 modal_delegate->GetWebContentsModalDialogHost()->GetHostView()); | |
1204 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); | 1201 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); |
1205 focus_manager_ = window_->GetFocusManager(); | 1202 focus_manager_ = window_->GetFocusManager(); |
1206 focus_manager_->AddFocusChangeListener(this); | 1203 focus_manager_->AddFocusChangeListener(this); |
1207 | 1204 |
1208 ShowDialogInMode(DETAIL_INPUT); | 1205 ShowDialogInMode(DETAIL_INPUT); |
1209 | 1206 |
1210 // Listen for size changes on the browser. | 1207 // Listen for size changes on the browser. |
1211 views::Widget* browser_widget = | 1208 views::Widget* browser_widget = |
1212 views::Widget::GetTopLevelWidgetForNativeView( | 1209 views::Widget::GetTopLevelWidgetForNativeView( |
1213 delegate_->GetWebContents()->GetView()->GetNativeView()); | 1210 delegate_->GetWebContents()->GetView()->GetNativeView()); |
(...skipping 1232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2443 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2447 : section(section), | 2444 : section(section), |
2448 container(NULL), | 2445 container(NULL), |
2449 manual_input(NULL), | 2446 manual_input(NULL), |
2450 suggested_info(NULL), | 2447 suggested_info(NULL), |
2451 suggested_button(NULL) {} | 2448 suggested_button(NULL) {} |
2452 | 2449 |
2453 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2450 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2454 | 2451 |
2455 } // namespace autofill | 2452 } // namespace autofill |
OLD | NEW |