Index: chrome/browser/ui/views/profiles/signin_view_controller.cc |
diff --git a/chrome/browser/ui/views/profiles/signin_view_controller.cc b/chrome/browser/ui/views/profiles/signin_view_controller.cc |
index 07176ce3072bd01b163c935f1947673a13c44487..f1edbc3244a9c2b041de41d959ed38b53ad75fe8 100644 |
--- a/chrome/browser/ui/views/profiles/signin_view_controller.cc |
+++ b/chrome/browser/ui/views/profiles/signin_view_controller.cc |
@@ -11,6 +11,7 @@ |
#include "chrome/browser/signin/signin_promo.h" |
#include "chrome/browser/ui/browser.h" |
#include "chrome/browser/ui/tabs/tab_strip_model.h" |
+#include "chrome/common/url_constants.h" |
#include "components/constrained_window/constrained_window_views.h" |
#include "components/signin/core/browser/signin_error_controller.h" |
#include "components/signin/core/common/profile_management_switches.h" |
@@ -25,6 +26,8 @@ const int kPasswordCombinedFixedGaiaViewHeight = 440; |
const int kPasswordCombinedFixedGaiaViewWidth = 360; |
const int kFixedGaiaViewHeight = 512; |
const int kFixedGaiaViewWidth = 448; |
+const int kSyncConfirmationDialogWidth = 448; |
+const int kSyncConfirmationDialogHeight = 351; |
class ModalSigninDelegate : public views::DialogDelegateView { |
public: |
@@ -123,6 +126,16 @@ views::WebView* SigninViewController::CreateGaiaWebView( |
return web_view; |
} |
+views::WebView* SigninViewController::CreateSyncConfirmationWebView( |
+ Profile* profile) { |
+ views::WebView* web_view = new views::WebView(profile); |
+ web_view->LoadInitialURL(GURL(chrome::kChromeUISyncConfirmationURL)); |
+ web_view->SetPreferredSize( |
+ gfx::Size(kSyncConfirmationDialogWidth, kSyncConfirmationDialogHeight)); |
+ |
+ return web_view; |
+} |
+ |
void SigninViewController::ShowModalSignin( |
profiles::BubbleViewMode mode, |
Browser* browser, |
@@ -145,6 +158,12 @@ void SigninViewController::ResetModalSigninDelegate() { |
modal_signin_delegate_ = nullptr; |
} |
+void SigninViewController::ShowModalSyncConfirmationDialog(Browser* browser) { |
+ CloseModalSignin(); |
+ modal_signin_delegate_ = new ModalSigninDelegate( |
+ this, CreateSyncConfirmationWebView(browser->profile()), browser); |
+} |
+ |
// static |
bool SigninViewController::ShouldShowModalSigninForMode( |
profiles::BubbleViewMode mode) { |