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

Unified Diff: chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm

Issue 13845022: Mac: Display a native bubble (instead of the JS one) after the web signin flow. (branched from http… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ntpBubble
Patch Set: Ditto Created 7 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/cocoa/one_click_signin_bubble_controller.mm
diff --git a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
index bebaaa0ae9e6f4559b20bd22c68109d4711cba29..6126103b4cb2c4f7a7f37c0770c4657a91d52b00 100644
--- a/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
+++ b/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.mm
@@ -4,6 +4,7 @@
#import "chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h"
+#include "base/strings/sys_string_conversions.h"
#import "chrome/browser/ui/cocoa/browser_window_controller.h"
#import "chrome/browser/ui/cocoa/info_bubble_window.h"
#import "chrome/browser/ui/cocoa/one_click_signin_view_controller.h"
@@ -20,14 +21,18 @@ void PerformClose(OneClickSigninBubbleController* controller) {
@implementation OneClickSigninBubbleController
- (id)initWithBrowserWindowController:(BrowserWindowController*)controller
+ webContents:(content::WebContents*)webContents
+ errorMessage:(NSString*)errorMessage
callback:(const BrowserWindow::StartSyncCallback&)
- syncCallback {
+ syncCallback{
viewController_.reset([[OneClickSigninViewController alloc]
initWithNibName:@"OneClickSigninBubble"
- webContents:NULL
+ webContents:webContents
syncCallback:syncCallback
closeCallback:base::Bind(PerformClose, self)
- isModalDialog:NO]);
+ isSyncDialog:NO
+ errorMessage:errorMessage]);
+
NSWindow* parentWindow = [controller window];
// Set the anchor point to right below the wrench menu.
@@ -52,6 +57,7 @@ void PerformClose(OneClickSigninBubbleController* controller) {
// -[BaseBubbleController windowWillClose:].
[self retain];
}
+
return self;
}

Powered by Google App Engine
This is Rietveld 408576698