Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(815)

Unified Diff: chrome/browser/ui/views/profiles/signin_view_controller.cc

Issue 1487283005: Implement the new Sync Confirmation dialog on Linux and Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Mac/ChromeOS builds and iOS tests. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 f394d78408ff2afa47eca6dbaaaba4172cec6ef9..487275529d3c5deebf8f1d6a8df4157123ef853c 100644
--- a/chrome/browser/ui/views/profiles/signin_view_controller.cc
+++ b/chrome/browser/ui/views/profiles/signin_view_controller.cc
@@ -12,6 +12,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/webui/signin/inline_login_ui.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"
@@ -34,6 +35,8 @@ const int kFixedGaiaViewHeight = 512;
const int kFixedGaiaViewWidth = 448;
const int kNavigationButtonSize = 16;
const int kNavigationButtonOffset = 16;
+const int kSyncConfirmationDialogWidth = 448;
+const int kSyncConfirmationDialogHeight = 351;
// View that contains the signin web contents and the back/close overlay button.
class HostView : public views::View {
@@ -222,6 +225,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,
@@ -244,6 +257,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) {
« no previous file with comments | « chrome/browser/ui/views/profiles/signin_view_controller.h ('k') | chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698