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

Side by Side Diff: chrome/browser/ui/cocoa/one_click_signin_bubble_controller.h

Issue 10332185: Update behavior of one-click infobar to remove modal dialog, add "undo". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make GTK ok and undo buttons the same size horizontally Created 8 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
7 #pragma once 7 #pragma once
8 8
9 #import <Cocoa/Cocoa.h> 9 #import <Cocoa/Cocoa.h>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "chrome/browser/ui/browser_window.h"
12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 13 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
13 14
14 @class BrowserWindowController; 15 @class BrowserWindowController;
15 16
16 // Displays the one-click signin confirmation bubble (after syncing 17 // Displays the one-click signin confirmation bubble (after syncing
17 // has started). 18 // has started).
18 @interface OneClickSigninBubbleController : BaseBubbleController { 19 @interface OneClickSigninBubbleController : BaseBubbleController {
19 @private 20 @private
20 IBOutlet NSTextField* messageField_; 21 IBOutlet NSTextField* messageField_;
22 // TODO(akalin): learnMoreLink_ needs to be removed, but it can't until
Peter Kasting 2012/05/24 22:25:18 Nit: can't -> can't be
Roger Tawa OOO till Jul 10th 2012/05/25 16:04:08 Done.
23 // the nib is changed too.
21 IBOutlet NSButton* learnMoreLink_; 24 IBOutlet NSButton* learnMoreLink_;
22 IBOutlet NSButton* advancedLink_; 25 IBOutlet NSButton* advancedLink_;
23 26
24 base::Closure learnMoreCallback_; 27 // TODO(akalin): Make sure this callback is called only once, like on
25 base::Closure advancedCallback_; 28 // other platforms.
29 BrowserWindow::StartSyncCallback start_sync_callback_;
26 } 30 }
27 31
28 // Initializes with a browser window controller, under whose wrench 32 // Initializes with a browser window controller, under whose wrench
29 // menu this bubble will be displayed, and callbacks which are called 33 // menu this bubble will be displayed, and callbacks which are called
30 // if the user clicks the corresponding link. 34 // if the user clicks the corresponding link.
31 // 35 //
32 // The bubble is not automatically displayed; call showWindow:id to 36 // The bubble is not automatically displayed; call showWindow:id to
33 // display. The bubble is auto-released on close. 37 // display. The bubble is auto-released on close.
34 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller 38 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller
35 learnMoreCallback:(const base::Closure&)learnMoreCallback 39 start_sync_callback:
36 advancedCallback:(const base::Closure&)advancedCallback; 40 (const BrowserWindow::StartSyncCallback&)
41 start_sync_callback;
37 42
38 // Just closes the bubble. 43 // Starts sync and closes the bubble.
39 - (IBAction)ok:(id)sender; 44 - (IBAction)ok:(id)sender;
40 45
41 // Calls |learnMoreCallback_|.
42 - (IBAction)onClickLearnMoreLink:(id)sender;
43
44 // Calls |advancedCallback_|. 46 // Calls |advancedCallback_|.
45 - (IBAction)onClickAdvancedLink:(id)sender; 47 - (IBAction)onClickAdvancedLink:(id)sender;
46 48
47 @end 49 @end
48 50
49 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_ 51 #endif // CHROME_BROWSER_UI_COCOA_ONE_CLICK_SIGNIN_DIALOG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698