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

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

Issue 1503583002: [Extensions Views] Update the extension installed bubble's sync promo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Latest master Created 5 years 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.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 8314f733d884246d135f237db323969ecf871e01..389b7458d9c39ba1c3230c5a923d69f899eb9a75 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -15,7 +15,8 @@
#include "chrome/browser/ui/bookmarks/bookmark_editor.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/sync/sync_promo_ui.h"
-#include "chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.h"
+#include "chrome/browser/ui/views/sync/bubble_sync_promo_view.h"
+#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/generated_resources.h"
#include "components/bookmarks/browser/bookmark_model.h"
#include "components/bookmarks/browser/bookmark_utils.h"
@@ -64,14 +65,15 @@ class UnsizedCombobox : public views::Combobox {
BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL;
// static
-void BookmarkBubbleView::ShowBubble(views::View* anchor_view,
- const gfx::Rect& anchor_rect,
- gfx::NativeView parent_window,
- bookmarks::BookmarkBubbleObserver* observer,
- scoped_ptr<BookmarkBubbleDelegate> delegate,
- Profile* profile,
- const GURL& url,
- bool already_bookmarked) {
+void BookmarkBubbleView::ShowBubble(
+ views::View* anchor_view,
+ const gfx::Rect& anchor_rect,
+ gfx::NativeView parent_window,
+ bookmarks::BookmarkBubbleObserver* observer,
+ scoped_ptr<BubbleSyncPromoDelegate> delegate,
+ Profile* profile,
+ const GURL& url,
+ bool already_bookmarked) {
if (bookmark_bubble_)
return;
@@ -255,7 +257,9 @@ void BookmarkBubbleView::Init() {
0);
layout->StartRow(0, SYNC_PROMO_COLUMN_SET_ID);
- sync_promo_view_ = new BookmarkSyncPromoView(delegate_.get());
+ sync_promo_view_ =
+ new BubbleSyncPromoView(delegate_.get(), IDS_BOOKMARK_SYNC_PROMO_LINK,
+ IDS_BOOKMARK_SYNC_PROMO_MESSAGE);
layout->AddView(sync_promo_view_);
}
@@ -275,7 +279,7 @@ views::View* BookmarkBubbleView::GetInitiallyFocusedView() {
BookmarkBubbleView::BookmarkBubbleView(
views::View* anchor_view,
bookmarks::BookmarkBubbleObserver* observer,
- scoped_ptr<BookmarkBubbleDelegate> delegate,
+ scoped_ptr<BubbleSyncPromoDelegate> delegate,
Profile* profile,
const GURL& url,
bool newly_bookmarked)
@@ -285,10 +289,9 @@ BookmarkBubbleView::BookmarkBubbleView(
profile_(profile),
url_(url),
newly_bookmarked_(newly_bookmarked),
- parent_model_(
- BookmarkModelFactory::GetForProfile(profile_),
- BookmarkModelFactory::GetForProfile(profile_)->
- GetMostRecentlyAddedUserNodeForURL(url)),
+ parent_model_(BookmarkModelFactory::GetForProfile(profile_),
+ BookmarkModelFactory::GetForProfile(profile_)
+ ->GetMostRecentlyAddedUserNodeForURL(url)),
remove_button_(NULL),
edit_button_(NULL),
close_button_(NULL),

Powered by Google App Engine
This is Rietveld 408576698