Index: chrome/browser/ui/views/profiles/profile_chooser_view.cc |
diff --git a/chrome/browser/ui/views/profiles/profile_chooser_view.cc b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
index d1945be97a86dc5fc214a8f77426e6823344af9e..e67d1effc6f60c81df229b3ef81173b5dbe6c872 100644 |
--- a/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
+++ b/chrome/browser/ui/views/profiles/profile_chooser_view.cc |
@@ -38,6 +38,7 @@ |
#include "components/signin/core/browser/signin_error_controller.h" |
#include "components/signin/core/browser/signin_manager.h" |
#include "components/signin/core/common/profile_management_switches.h" |
+#include "components/web_modal/web_contents_modal_dialog_manager.h" |
#include "content/public/browser/render_widget_host_view.h" |
#include "grit/theme_resources.h" |
#include "third_party/skia/include/core/SkColor.h" |
@@ -73,7 +74,10 @@ namespace { |
const int kFixedMenuWidth = 250; |
const int kButtonHeight = 32; |
const int kFixedGaiaViewHeight = 440; |
-const int kFixedGaiaViewWidth = 360; |
+// TODO(wjmaclean): This next value needs to be wide enough for the SSL |
+// certificate selector box ... would it be easier to convince the certificate |
+// selector dialog to be resizable? |
+const int kFixedGaiaViewWidth = 500; |
const int kFixedAccountRemovalViewWidth = 280; |
const int kFixedSwitchUserViewWidth = 320; |
const int kLargeImageSide = 88; |
@@ -1537,6 +1541,12 @@ views::View* ProfileChooserView::CreateGaiaSigninView( |
views::WebView* web_view = new views::WebView(profile); |
web_view->LoadInitialURL(url); |
web_view->GetWebContents()->SetDelegate(this); |
+ web_modal::WebContentsModalDialogManager::CreateForWebContents( |
+ web_view->GetWebContents()); |
+ web_modal::WebContentsModalDialogManager::FromWebContents( |
+ web_view->GetWebContents()) |
+ ->SetDelegate(this); |
+ |
web_view->SetPreferredSize( |
gfx::Size(kFixedGaiaViewWidth, kFixedGaiaViewHeight)); |
content::RenderWidgetHostView* rwhv = |
@@ -1754,3 +1764,26 @@ void ProfileChooserView::PostActionPerformed( |
ProfileMetrics::LogProfileDesktopMenu(action_performed, gaia_service_type_); |
gaia_service_type_ = signin::GAIA_SERVICE_TYPE_NONE; |
} |
+ |
+web_modal::WebContentsModalDialogHost* |
+ProfileChooserView::GetWebContentsModalDialogHost() { |
+ return this; |
+} |
+ |
+gfx::Size ProfileChooserView::GetMaximumDialogSize() { |
+ return bounds().size(); |
+} |
+ |
+gfx::NativeView ProfileChooserView::GetHostView() const { |
+ return GetWidget()->GetNativeView(); |
+} |
+ |
+gfx::Point ProfileChooserView::GetDialogPosition(const gfx::Size& size) { |
+ return gfx::Point(); |
+} |
+ |
+void ProfileChooserView::AddObserver( |
+ web_modal::ModalDialogHostObserver* observer) {} |
+ |
+void ProfileChooserView::RemoveObserver( |
+ web_modal::ModalDialogHostObserver* observer) {} |