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

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: Minor comment fixes 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 #import "chrome/browser/ui/cocoa/base_bubble_controller.h" 12 #import "chrome/browser/ui/cocoa/base_bubble_controller.h"
13 13
14 @class BrowserWindowController; 14 @class BrowserWindowController;
15 15
16 // Displays the one-click signin confirmation bubble (after syncing 16 // Displays the one-click signin confirmation bubble (after syncing
17 // has started). 17 // has started).
18 @interface OneClickSigninBubbleController : BaseBubbleController { 18 @interface OneClickSigninBubbleController : BaseBubbleController {
19 @private 19 @private
20 IBOutlet NSTextField* messageField_; 20 IBOutlet NSTextField* messageField_;
21 // TODO(akalin): learnMoreLink_ needs to be removed, but it can't until
22 // the nib is changed too.
21 IBOutlet NSButton* learnMoreLink_; 23 IBOutlet NSButton* learnMoreLink_;
22 IBOutlet NSButton* advancedLink_; 24 IBOutlet NSButton* advancedLink_;
23 25
24 base::Closure learnMoreCallback_; 26 base::Callback<void(bool)> start_sync_callback_;
25 base::Closure advancedCallback_;
26 } 27 }
27 28
28 // Initializes with a browser window controller, under whose wrench 29 // Initializes with a browser window controller, under whose wrench
29 // menu this bubble will be displayed, and callbacks which are called 30 // menu this bubble will be displayed, and callbacks which are called
30 // if the user clicks the corresponding link. 31 // if the user clicks the corresponding link.
31 // 32 //
32 // The bubble is not automatically displayed; call showWindow:id to 33 // The bubble is not automatically displayed; call showWindow:id to
33 // display. The bubble is auto-released on close. 34 // display. The bubble is auto-released on close.
34 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller 35 - (id)initWithBrowserWindowController:(BrowserWindowController*)controller
35 learnMoreCallback:(const base::Closure&)learnMoreCallback 36 start_sync_callback:(const base::Callback<void(bool)>&)start_sync_callback;
36 advancedCallback:(const base::Closure&)advancedCallback; 37
38 // Starts sync and closes the bubble.
39 - (IBAction)ok:(id)sender;
37 40
38 // Just closes the bubble. 41 // Just closes the bubble.
39 - (IBAction)ok:(id)sender; 42 // TODO(akalin): The following line should be uncommented once the nib is
akalin 2012/05/18 17:57:03 I think you should just remove this completely, an
Roger Tawa OOO till Jul 10th 2012/05/23 17:13:02 Done.
40 43 // also changed.
41 // Calls |learnMoreCallback_|. 44 // - (IBAction)undo:(id)sender;
42 - (IBAction)onClickLearnMoreLink:(id)sender;
43 45
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