| 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);
|
| };
|
|
|