1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_ 6#define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_ 7 8#import <Cocoa/Cocoa.h> 9 10#include "base/callback.h" 11#include "base/mac/scoped_nsobject.h" 12#include "chrome/browser/ui/browser_window.h" 13#import "chrome/browser/ui/cocoa/base_bubble_controller.h" 14 15@class BrowserWindowController; 16@class OneClickSigninViewController; 17 18// Displays the one-click signin confirmation bubble 19@interface OneClickSigninBubbleController : BaseBubbleController { 20 base::scoped_nsobject<OneClickSigninViewController> viewController_; 21 @private 22 IBOutlet NSTextField* messageTextField_; 23} 24 25@property(readonly, nonatomic) OneClickSigninViewController* viewController; 26 27// Initializes with a browser window |controller|, under whose wrench 28// menu this bubble will be displayed, and callbacks which are called 29// if the user clicks the corresponding link. |errorMessage| is an 30// alternate message that will be displayed in the case of an authentication 31// error, and |syncCallback| is called to start sync. |webContents| is used 32// to open the Learn More and Advanced links 33// 34// The bubble is not automatically displayed; call showWindow:id to 35// display. The bubble is auto-released on close. 36- (id)initWithBrowserWindowController:(BrowserWindowController*)controller 37 webContents:(content::WebContents*)webContents 38 errorMessage:(NSString*)errorMessage 39 callback:(const BrowserWindow::StartSyncCallback&) 40 syncCallback; 41 42@end 43 44#endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_ 45