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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Common layout constants Created 7 years, 5 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
Index: chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h
index da037102a0a385e8746be23faf2b0e00f196ab19..f54061a11d7ff4ebdc390fa58f1fafa08b51416b 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h
@@ -7,7 +7,10 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/gtest_prod_util.h"
+#include "base/memory/scoped_ptr.h"
#include "base/strings/string16.h"
+#include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h"
#include "chrome/browser/ui/bookmarks/recently_used_folders_combo_model.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h"
@@ -32,6 +35,7 @@ class BookmarkBubbleView : public views::BubbleDelegateView,
public:
static void ShowBubble(views::View* anchor_view,
BookmarkBubbleViewObserver* observer,
+ BookmarkBubbleDelegate* delegate,
sky 2013/07/17 16:08:02 Make this take a scoped_ptr so that ownership is c
fdoray 2013/07/17 19:39:56 Done.
Profile* profile,
const GURL& url,
bool newly_bookmarked);
@@ -56,9 +60,14 @@ class BookmarkBubbleView : public views::BubbleDelegateView,
virtual void Init() OVERRIDE;
private:
- // Creates a BookmarkBubbleView.
+ friend class BookmarkBubbleViewTest;
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoSignedIn);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoNotSignedIn);
+
+ // Creates a BookmarkBubbleView. |delegate| is owned by the bubble.
BookmarkBubbleView(views::View* anchor_view,
BookmarkBubbleViewObserver* observer,
+ BookmarkBubbleDelegate* delegate,
Profile* profile,
const GURL& url,
bool newly_bookmarked);
@@ -92,6 +101,9 @@ class BookmarkBubbleView : public views::BubbleDelegateView,
// Our observer, to notify when the bubble shows or hides.
BookmarkBubbleViewObserver* observer_;
+ // Delegate, to handle clicks on the sign in link.
+ scoped_ptr<BookmarkBubbleDelegate> delegate_;
+
// The profile.
Profile* profile_;
@@ -119,6 +131,9 @@ class BookmarkBubbleView : public views::BubbleDelegateView,
// the current parent.
views::Combobox* parent_combobox_;
+ // Bookmark sync promo view, if displayed.
+ views::View* sync_promo_view_;
+
// When the destructor is invoked should the bookmark be removed?
bool remove_bookmark_;

Powered by Google App Engine
This is Rietveld 408576698