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

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: Fix test for CrOS 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
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..82cdfa9c9447289a2d3e497ad66612e41af1ae49 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,
+ scoped_ptr<BookmarkBubbleDelegate> delegate,
Profile* profile,
const GURL& url,
bool newly_bookmarked);
@@ -56,9 +60,14 @@ class BookmarkBubbleView : public views::BubbleDelegateView,
virtual void Init() OVERRIDE;
private:
+ friend class BookmarkBubbleViewTest;
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoSignedIn);
+ FRIEND_TEST_ALL_PREFIXES(BookmarkBubbleViewTest, SyncPromoNotSignedIn);
+
// Creates a BookmarkBubbleView.
BookmarkBubbleView(views::View* anchor_view,
BookmarkBubbleViewObserver* observer,
+ scoped_ptr<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_;
« no previous file with comments | « chrome/browser/ui/sync/sync_promo_ui.cc ('k') | chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698