Index: chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
diff --git a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
index 53abb0f595f161520079331ebbc1a4ffcf69c7ec..7749bbb29f58c1681b0a56c666df4893caafc231 100644 |
--- a/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
+++ b/chrome/browser/ui/views/sync/one_click_signin_bubble_view.h |
@@ -10,6 +10,7 @@ |
#include "base/callback.h" |
#include "base/compiler_specific.h" |
#include "base/string16.h" |
+#include "chrome/browser/ui/browser_window.h" |
#include "ui/views/bubble/bubble_delegate.h" |
#include "ui/views/controls/button/button.h" |
#include "ui/views/controls/link_listener.h" |
@@ -28,11 +29,10 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
public views::ButtonListener { |
public: |
// Show the one-click signin bubble if not already showing. The bubble |
- // will be placed visually beneath |anchor_view|. The |browser| is used |
- // to open links. |
+ // will be placed visually beneath |anchor_view|. |start_sync| is called |
+ // to start sync. |
static void ShowBubble(views::View* anchor_view, |
- const base::Closure& learn_more_callback, |
- const base::Closure& advanced_callback); |
+ const BrowserWindow::StartSyncCallback& start_sync); |
static bool IsShowing(); |
@@ -43,18 +43,18 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } |
// The following accessor message should only be used for testing. |
Peter Kasting
2012/05/25 21:09:33
Did you decide these should still stay as for_test
Roger Tawa OOO till Jul 10th
2012/05/26 01:56:02
Done.
|
- views::Link* learn_more_link_for_testing() const { return learn_more_link_; } |
views::Link* advanced_link_for_testing() const { return advanced_link_; } |
- views::TextButton* close_button_for_testing() const { return close_button_; } |
+ views::TextButton* ok_button_for_testing() const { return ok_button_; } |
+ views::TextButton* undo_button_for_testing() const { return undo_button_; } |
void set_message_loop_for_testing(MessageLoop* loop) { |
message_loop_for_testing_ = loop; |
} |
private: |
// Creates a BookmarkBubbleView. |
- OneClickSigninBubbleView(views::View* anchor_view, |
- const base::Closure& learn_more_callback, |
- const base::Closure& advanced_callback); |
+ OneClickSigninBubbleView( |
+ views::View* anchor_view, |
+ const BrowserWindow::StartSyncCallback& start_sync_callback); |
virtual ~OneClickSigninBubbleView(); |
@@ -78,18 +78,17 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
// The bubble, if we're showing one. |
static OneClickSigninBubbleView* bubble_view_; |
- // Link to web page to learn more about sync. |
- views::Link* learn_more_link_; |
- |
// Link to sync setup advanced page. |
views::Link* advanced_link_; |
- // Button to close the window. |
- views::TextButton* close_button_; |
+ // Controls at buttom of bubble. |
+ views::TextButton* ok_button_; |
+ views::TextButton* undo_button_; |
- // The callbacks for the links. |
- base::Closure learn_more_callback_; |
- 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_; |
// A message loop used only with unit tests. |
MessageLoop* message_loop_for_testing_; |