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

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

Issue 1518543002: Adds MD ink ripple animations to buttons within location bar (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Adds MD ink ripple animations to buttons within location bar (missing member init) Created 4 years, 11 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.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index 620893d655570ad4800bb6737941c9f28037fd40..2db97b9a4e6e55f9751b8802420c9f8d17456257 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -69,7 +69,7 @@ class UnsizedCombobox : public views::Combobox {
BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL;
// static
-void BookmarkBubbleView::ShowBubble(
+views::Widget* BookmarkBubbleView::ShowBubble(
views::View* anchor_view,
const gfx::Rect& anchor_rect,
gfx::NativeView parent_window,
@@ -79,7 +79,7 @@ void BookmarkBubbleView::ShowBubble(
const GURL& url,
bool already_bookmarked) {
if (bookmark_bubble_)
- return;
+ return nullptr;
bookmark_bubble_ =
new BookmarkBubbleView(anchor_view, observer, std::move(delegate),
@@ -88,7 +88,9 @@ void BookmarkBubbleView::ShowBubble(
bookmark_bubble_->SetAnchorRect(anchor_rect);
bookmark_bubble_->set_parent_window(parent_window);
}
- views::BubbleDelegateView::CreateBubble(bookmark_bubble_)->Show();
+ views::Widget* bubble_widget =
+ views::BubbleDelegateView::CreateBubble(bookmark_bubble_);
+ bubble_widget->Show();
// Select the entire title textfield contents when the bubble is first shown.
bookmark_bubble_->title_tf_->SelectAll(true);
bookmark_bubble_->SetArrowPaintType(views::BubbleBorder::PAINT_NONE);
@@ -98,6 +100,7 @@ void BookmarkBubbleView::ShowBubble(
const BookmarkNode* node = model->GetMostRecentlyAddedUserNodeForURL(url);
bookmark_bubble_->observer_->OnBookmarkBubbleShown(node);
}
+ return bubble_widget;
}
void BookmarkBubbleView::Hide() {
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698