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

Unified Diff: chrome/browser/ui/webui/signin/sync_confirmation_handler.cc

Issue 1814513002: Fix sizing issues in the tab modal signin flow. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address message handler related feedback Created 4 years, 8 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/webui/signin/sync_confirmation_handler.cc
diff --git a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
index df51a0d195a06e803804e9a1cb407d2a7358a3e3..5a65f9bf0620a5511213b91af3cfdf041b1ed88d 100644
--- a/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
+++ b/chrome/browser/ui/webui/signin/sync_confirmation_handler.cc
@@ -10,6 +10,7 @@
#include "chrome/browser/signin/signin_manager_factory.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
+#include "chrome/browser/ui/signin_view_controller_delegate.h"
#include "chrome/browser/ui/webui/signin/login_ui_service_factory.h"
#include "components/signin/core/browser/account_tracker_service.h"
#include "content/public/browser/user_metrics.h"
@@ -38,6 +39,9 @@ void SyncConfirmationHandler::RegisterMessages() {
web_ui()->RegisterMessageCallback("goToSettings",
base::Bind(&SyncConfirmationHandler::HandleGoToSettings,
base::Unretained(this)));
+ web_ui()->RegisterMessageCallback("resizeNativeView",
+ base::Bind(&SyncConfirmationHandler::HandleResizeNativeView,
+ base::Unretained(this)));
}
void SyncConfirmationHandler::HandleConfirm(const base::ListValue* args) {
@@ -111,3 +115,16 @@ void SyncConfirmationHandler::CloseModalSigninWindow(
SyncConfirmationUIClosed(results);
browser->CloseModalSigninWindow();
}
+
+void SyncConfirmationHandler::HandleResizeNativeView(
+ const base::ListValue* args) {
+ double height;
+ bool success = args->GetDouble(0, &height);
+ DCHECK(success);
+
+ Browser* browser = GetDesktopBrowser();
+ DCHECK(browser);
+
+ browser->signin_view_controller()->delegate()->ResizeNativeView(
+ static_cast<int>(height));
+}

Powered by Google App Engine
This is Rietveld 408576698