summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h
blob: 5298ef042e485c921e2e5be6d581d64579830c50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_
#define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_

#import <Cocoa/Cocoa.h>

#include "base/callback.h"
#include "base/mac/scoped_nsobject.h"
#include "chrome/browser/ui/browser_window.h"
#import "chrome/browser/ui/cocoa/base_bubble_controller.h"

@class BrowserWindowController;
@class OneClickSigninViewController;

// Displays the one-click signin confirmation bubble
@interface OneClickSigninBubbleController : BaseBubbleController {
  base::scoped_nsobject<OneClickSigninViewController> viewController_;
 @private
   IBOutlet NSTextField* messageTextField_;
}

@property(readonly, nonatomic) OneClickSigninViewController* viewController;

// Initializes with a browser window |controller|, under whose wrench
// menu this bubble will be displayed, and callbacks which are called
// if the user clicks the corresponding link. |errorMessage| is an
// alternate message that will be displayed in the case of an authentication
// error, and |syncCallback| is called to start sync. |webContents| is used
// to open the Learn More and Advanced links
//
// The bubble is not automatically displayed; call showWindow:id to
// display.  The bubble is auto-released on close.
- (id)initWithBrowserWindowController:(BrowserWindowController*)controller
                          webContents:(content::WebContents*)webContents
                         errorMessage:(NSString*)errorMessage
                             callback:(const BrowserWindow::StartSyncCallback&)
                                          syncCallback;

@end

#endif  // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_BUBBLE_CONTROLLER_H_