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

Unified Diff: chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm

Issue 2771113003: Use the same browser instance in the sync confirmation dialog. (Closed)
Patch Set: Self review Created 3 years, 9 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/cocoa/profiles/signin_view_controller_delegate_mac.mm
diff --git a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
index 9741d0f197f245a1351ec5fa18b332f95cadae76..69d908fc77b61dfefa88b1a0a616d17e847cd4fb 100644
--- a/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/profiles/signin_view_controller_delegate_mac.mm
@@ -15,6 +15,7 @@
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_sheet.h"
#include "chrome/browser/ui/cocoa/constrained_window/constrained_window_custom_window.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
+#include "chrome/browser/ui/webui/signin/sync_confirmation_ui.h"
#include "chrome/common/url_constants.h"
#include "components/signin/core/common/profile_management_switches.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -121,6 +122,9 @@ SigninViewControllerDelegateMac::CreateSyncConfirmationWebContents(
web_contents->GetController().LoadURL(
GURL(chrome::kChromeUISyncConfirmationURL), content::Referrer(),
ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
+ SyncConfirmationUI* sync_confirmation_ui = static_cast<SyncConfirmationUI*>(
+ web_contents->GetWebUI()->GetController());
+ sync_confirmation_ui->InitializeMessageHandlerWithBrowser(browser);
NSView* webview = web_contents->GetNativeView();
[webview setFrameSize:NSMakeSize(

Powered by Google App Engine
This is Rietveld 408576698