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

Unified Diff: chrome/browser/ui/gtk/one_click_signin_bubble_gtk.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: rebase 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h
diff --git a/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h b/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h
index 12fed1019b235c548c0b64503a745cd20b782b25..f2ac5adddde9c99aaeb72c1744e1abdc9ac10c18 100644
--- a/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h
+++ b/chrome/browser/ui/gtk/one_click_signin_bubble_gtk.h
@@ -9,6 +9,9 @@
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
+#include "chrome/browser/ui/base_window.h"
+#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/gtk/bubble/bubble_gtk.h"
typedef struct _GtkWidget GtkWidget;
@@ -16,34 +19,38 @@ typedef struct _GtkWindow GtkWindow;
class BrowserWindowGtk;
-// Displays the one-click signin confirmation bubble (after syncing
+// Displays the one-click signin confirmation bubble (before syncing
// has started).
class OneClickSigninBubbleGtk : public BubbleDelegateGtk {
public:
- // Deletes self on close. The given callbacks will be called if the
- // user clicks the corresponding link.
- OneClickSigninBubbleGtk(BrowserWindowGtk* browser_window_gtk,
- const base::Closure& learn_more_callback,
- const base::Closure& advanced_callback);
+ // Deletes self on close. The given callback will be called if the
+ // user decides to start sync.
+ OneClickSigninBubbleGtk(
+ BrowserWindowGtk* browser_window_gtk,
+ const BrowserWindow::StartSyncCallback& start_sync_callback);
// BubbleDelegateGtk implementation.
virtual void BubbleClosing(
BubbleGtk* bubble, bool closed_by_escape) OVERRIDE;
- void ClickOKForTest();
- void ClickLearnMoreForTest();
- void ClickAdvancedForTest();
-
private:
+ FRIEND_TEST_ALL_PREFIXES(OneClickSigninBubbleGtkTest, ShowAndOK);
+ FRIEND_TEST_ALL_PREFIXES(OneClickSigninBubbleGtkTest, ShowAndUndo);
+ FRIEND_TEST_ALL_PREFIXES(OneClickSigninBubbleGtkTest, ShowAndClickAdvanced);
+ FRIEND_TEST_ALL_PREFIXES(OneClickSigninBubbleGtkTest, ShowAndClose);
+
virtual ~OneClickSigninBubbleGtk();
- CHROMEGTK_CALLBACK_0(OneClickSigninBubbleGtk, void, OnClickLearnMoreLink);
CHROMEGTK_CALLBACK_0(OneClickSigninBubbleGtk, void, OnClickAdvancedLink);
CHROMEGTK_CALLBACK_0(OneClickSigninBubbleGtk, void, OnClickOK);
+ CHROMEGTK_CALLBACK_0(OneClickSigninBubbleGtk, void, OnClickUndo);
BubbleGtk* bubble_;
- const base::Closure learn_more_callback_;
- const base::Closure advanced_callback_;
+
+ // This callback is nulled once its called, so that it is called only once.
+ // It will be called when the bubble is closed if it has not been called
+ // and nulled earlier.
+ BrowserWindow::StartSyncCallback start_sync_callback_;
DISALLOW_COPY_AND_ASSIGN(OneClickSigninBubbleGtk);
};
« no previous file with comments | « chrome/browser/ui/gtk/browser_window_gtk.cc ('k') | chrome/browser/ui/gtk/one_click_signin_bubble_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698