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..a3022f0920990aa15b2a419af5dfc2fc70af3018 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,11 @@ 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|. The closures are called |
+ // to open the corresponding links, and the callback is used to start sync. |
+ // The bool argument indicates if default sync settings should be used. |
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 +44,18 @@ class OneClickSigninBubbleView : public views::BubbleDelegateView, |
static OneClickSigninBubbleView* view_for_testing() { return bubble_view_; } |
// The following accessor message should only be used for testing. |
- 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 +79,14 @@ 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_; |
+ BrowserWindow::StartSyncCallback start_sync_callback_; |
akalin
2012/05/24 18:42:04
comment explaining that the callback is nulled out
Roger Tawa OOO till Jul 10th
2012/05/24 19:08:33
Done.
|
// A message loop used only with unit tests. |
MessageLoop* message_loop_for_testing_; |