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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 1089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1100 // care of deleting itself after calling DeleteDelegate(). | 1100 // care of deleting itself after calling DeleteDelegate(). |
1101 WebContentsModalDialogManager* web_contents_modal_dialog_manager = | 1101 WebContentsModalDialogManager* web_contents_modal_dialog_manager = |
1102 WebContentsModalDialogManager::FromWebContents( | 1102 WebContentsModalDialogManager::FromWebContents( |
1103 controller_->web_contents()); | 1103 controller_->web_contents()); |
1104 window_ = CreateWebContentsModalDialogViews( | 1104 window_ = CreateWebContentsModalDialogViews( |
1105 this, | 1105 this, |
1106 controller_->web_contents()->GetView()->GetNativeView(), | 1106 controller_->web_contents()->GetView()->GetNativeView(), |
1107 web_contents_modal_dialog_manager->delegate()-> | 1107 web_contents_modal_dialog_manager->delegate()-> |
1108 GetWebContentsModalDialogHost()); | 1108 GetWebContentsModalDialogHost()); |
1109 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); | 1109 web_contents_modal_dialog_manager->ShowDialog(window_->GetNativeView()); |
| 1110 web_contents_modal_dialog_manager->SetPreventCloseOnLoadStart( |
| 1111 window_->GetNativeView(), true); |
1110 focus_manager_ = window_->GetFocusManager(); | 1112 focus_manager_ = window_->GetFocusManager(); |
1111 focus_manager_->AddFocusChangeListener(this); | 1113 focus_manager_->AddFocusChangeListener(this); |
1112 | 1114 |
1113 // Listen for size changes on the browser. | 1115 // Listen for size changes on the browser. |
1114 views::Widget* browser_widget = | 1116 views::Widget* browser_widget = |
1115 views::Widget::GetTopLevelWidgetForNativeView( | 1117 views::Widget::GetTopLevelWidgetForNativeView( |
1116 controller_->web_contents()->GetView()->GetNativeView()); | 1118 controller_->web_contents()->GetView()->GetNativeView()); |
1117 observer_.Add(browser_widget); | 1119 observer_.Add(browser_widget); |
1118 | 1120 |
1119 gfx::Image splash_image = controller_->SplashPageImage(); | 1121 gfx::Image splash_image = controller_->SplashPageImage(); |
(...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2211 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) | 2213 AutofillDialogViews::DetailsGroup::DetailsGroup(DialogSection section) |
2212 : section(section), | 2214 : section(section), |
2213 container(NULL), | 2215 container(NULL), |
2214 manual_input(NULL), | 2216 manual_input(NULL), |
2215 suggested_info(NULL), | 2217 suggested_info(NULL), |
2216 suggested_button(NULL) {} | 2218 suggested_button(NULL) {} |
2217 | 2219 |
2218 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} | 2220 AutofillDialogViews::DetailsGroup::~DetailsGroup() {} |
2219 | 2221 |
2220 } // namespace autofill | 2222 } // namespace autofill |
OLD | NEW |