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

Side by Side 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 (with WidgetObserver) 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 private: 63 private:
64 DISALLOW_COPY_AND_ASSIGN(UnsizedCombobox); 64 DISALLOW_COPY_AND_ASSIGN(UnsizedCombobox);
65 }; 65 };
66 66
67 } // namespace 67 } // namespace
68 68
69 BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL; 69 BookmarkBubbleView* BookmarkBubbleView::bookmark_bubble_ = NULL;
70 70
71 // static 71 // static
72 void BookmarkBubbleView::ShowBubble( 72 void BookmarkBubbleView::ShowBubble(
73 views::View* anchor_view, 73 views::WidgetObserverView* anchor_view,
74 const gfx::Rect& anchor_rect, 74 const gfx::Rect& anchor_rect,
75 gfx::NativeView parent_window, 75 gfx::NativeView parent_window,
76 bookmarks::BookmarkBubbleObserver* observer, 76 bookmarks::BookmarkBubbleObserver* observer,
77 scoped_ptr<BubbleSyncPromoDelegate> delegate, 77 scoped_ptr<BubbleSyncPromoDelegate> delegate,
78 Profile* profile, 78 Profile* profile,
79 const GURL& url, 79 const GURL& url,
80 bool already_bookmarked) { 80 bool already_bookmarked) {
81 if (bookmark_bubble_) 81 if (bookmark_bubble_)
82 return; 82 return;
83 83
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 276
277 const char* BookmarkBubbleView::GetClassName() const { 277 const char* BookmarkBubbleView::GetClassName() const {
278 return "BookmarkBubbleView"; 278 return "BookmarkBubbleView";
279 } 279 }
280 280
281 views::View* BookmarkBubbleView::GetInitiallyFocusedView() { 281 views::View* BookmarkBubbleView::GetInitiallyFocusedView() {
282 return title_tf_; 282 return title_tf_;
283 } 283 }
284 284
285 BookmarkBubbleView::BookmarkBubbleView( 285 BookmarkBubbleView::BookmarkBubbleView(
286 views::View* anchor_view, 286 views::WidgetObserverView* anchor_view,
287 bookmarks::BookmarkBubbleObserver* observer, 287 bookmarks::BookmarkBubbleObserver* observer,
288 scoped_ptr<BubbleSyncPromoDelegate> delegate, 288 scoped_ptr<BubbleSyncPromoDelegate> delegate,
289 Profile* profile, 289 Profile* profile,
290 const GURL& url, 290 const GURL& url,
291 bool newly_bookmarked) 291 bool newly_bookmarked)
292 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT), 292 : BubbleDelegateView(anchor_view, views::BubbleBorder::TOP_RIGHT),
293 observer_(observer), 293 observer_(observer),
294 delegate_(std::move(delegate)), 294 delegate_(std::move(delegate)),
295 profile_(profile), 295 profile_(profile),
296 url_(url), 296 url_(url),
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 if (node) { 386 if (node) {
387 const base::string16 new_title = title_tf_->text(); 387 const base::string16 new_title = title_tf_->text();
388 if (new_title != node->GetTitle()) { 388 if (new_title != node->GetTitle()) {
389 model->SetTitle(node, new_title); 389 model->SetTitle(node, new_title);
390 content::RecordAction( 390 content::RecordAction(
391 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble")); 391 UserMetricsAction("BookmarkBubble_ChangeTitleInBubble"));
392 } 392 }
393 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index()); 393 parent_model_.MaybeChangeParent(node, parent_combobox_->selected_index());
394 } 394 }
395 } 395 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698