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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 1937103003: Rename of InkDropAnimation classes to InkDropRipple. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed test_ink_drop_animation_observer.h from views.gyp and doc update. Created 4 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_item_view_md.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 #include "ui/gfx/color_utils.h" 89 #include "ui/gfx/color_utils.h"
90 #include "ui/gfx/favicon_size.h" 90 #include "ui/gfx/favicon_size.h"
91 #include "ui/gfx/geometry/rect.h" 91 #include "ui/gfx/geometry/rect.h"
92 #include "ui/gfx/paint_vector_icon.h" 92 #include "ui/gfx/paint_vector_icon.h"
93 #include "ui/gfx/scoped_canvas.h" 93 #include "ui/gfx/scoped_canvas.h"
94 #include "ui/gfx/text_constants.h" 94 #include "ui/gfx/text_constants.h"
95 #include "ui/gfx/text_elider.h" 95 #include "ui/gfx/text_elider.h"
96 #include "ui/gfx/vector_icons_public.h" 96 #include "ui/gfx/vector_icons_public.h"
97 #include "ui/resources/grit/ui_resources.h" 97 #include "ui/resources/grit/ui_resources.h"
98 #include "ui/views/animation/button_ink_drop_delegate.h" 98 #include "ui/views/animation/button_ink_drop_delegate.h"
99 #include "ui/views/animation/flood_fill_ink_drop_animation.h" 99 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
100 #include "ui/views/animation/ink_drop_hover.h" 100 #include "ui/views/animation/ink_drop_hover.h"
101 #include "ui/views/button_drag_utils.h" 101 #include "ui/views/button_drag_utils.h"
102 #include "ui/views/controls/button/label_button.h" 102 #include "ui/views/controls/button/label_button.h"
103 #include "ui/views/controls/button/label_button_border.h" 103 #include "ui/views/controls/button/label_button_border.h"
104 #include "ui/views/controls/button/menu_button.h" 104 #include "ui/views/controls/button/menu_button.h"
105 #include "ui/views/controls/label.h" 105 #include "ui/views/controls/label.h"
106 #include "ui/views/drag_utils.h" 106 #include "ui/views/drag_utils.h"
107 #include "ui/views/metrics.h" 107 #include "ui/views/metrics.h"
108 #include "ui/views/view_constants.h" 108 #include "ui/views/view_constants.h"
109 #include "ui/views/widget/tooltip_manager.h" 109 #include "ui/views/widget/tooltip_manager.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 kButtonPaddingHorizontal)); 231 kButtonPaddingHorizontal));
232 return border; 232 return border;
233 } 233 }
234 234
235 bool IsTriggerableEvent(const ui::Event& e) override { 235 bool IsTriggerableEvent(const ui::Event& e) override {
236 return e.type() == ui::ET_GESTURE_TAP || 236 return e.type() == ui::ET_GESTURE_TAP ||
237 e.type() == ui::ET_GESTURE_TAP_DOWN || 237 e.type() == ui::ET_GESTURE_TAP_DOWN ||
238 event_utils::IsPossibleDispositionEvent(e); 238 event_utils::IsPossibleDispositionEvent(e);
239 } 239 }
240 240
241 std::unique_ptr<views::InkDropAnimation> CreateInkDropAnimation() 241 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
242 const override { 242 return base::WrapUnique(new views::FloodFillInkDropRipple(
243 return base::WrapUnique(new views::FloodFillInkDropAnimation(
244 CalculateInkDropBounds(size()), GetInkDropCenter(), 243 CalculateInkDropBounds(size()), GetInkDropCenter(),
245 GetInkDropBaseColor())); 244 GetInkDropBaseColor()));
246 } 245 }
247 246
248 std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override { 247 std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override {
249 if (!ShouldShowInkDropHover()) 248 if (!ShouldShowInkDropHover())
250 return nullptr; 249 return nullptr;
251 250
252 const gfx::Rect bounds = CalculateInkDropBounds(size()); 251 const gfx::Rect bounds = CalculateInkDropBounds(size());
253 return base::WrapUnique(new views::InkDropHover( 252 return base::WrapUnique(new views::InkDropHover(
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 class BookmarkMenuButtonBase : public views::MenuButton { 332 class BookmarkMenuButtonBase : public views::MenuButton {
334 public: 333 public:
335 BookmarkMenuButtonBase(const base::string16& title, 334 BookmarkMenuButtonBase(const base::string16& title,
336 views::MenuButtonListener* menu_button_listener, 335 views::MenuButtonListener* menu_button_listener,
337 bool show_menu_marker) 336 bool show_menu_marker)
338 : MenuButton(title, menu_button_listener, show_menu_marker), 337 : MenuButton(title, menu_button_listener, show_menu_marker),
339 ink_drop_delegate_(this, this) { 338 ink_drop_delegate_(this, this) {
340 set_ink_drop_delegate(&ink_drop_delegate_); 339 set_ink_drop_delegate(&ink_drop_delegate_);
341 } 340 }
342 341
343 std::unique_ptr<views::InkDropAnimation> CreateInkDropAnimation() 342 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
344 const override { 343 return base::WrapUnique(new views::FloodFillInkDropRipple(
345 return base::WrapUnique(new views::FloodFillInkDropAnimation(
346 CalculateInkDropBounds(size()), GetInkDropCenter(), 344 CalculateInkDropBounds(size()), GetInkDropCenter(),
347 GetInkDropBaseColor())); 345 GetInkDropBaseColor()));
348 } 346 }
349 347
350 std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override { 348 std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override {
351 if (!ShouldShowInkDropHover()) 349 if (!ShouldShowInkDropHover())
352 return nullptr; 350 return nullptr;
353 351
354 const gfx::Rect bounds = CalculateInkDropBounds(size()); 352 const gfx::Rect bounds = CalculateInkDropBounds(size());
355 return base::WrapUnique(new views::InkDropHover( 353 return base::WrapUnique(new views::InkDropHover(
(...skipping 1808 matching lines...) Expand 10 before | Expand all | Expand 10 after
2164 return; 2162 return;
2165 apps_page_shortcut_->SetVisible(visible); 2163 apps_page_shortcut_->SetVisible(visible);
2166 UpdateBookmarksSeparatorVisibility(); 2164 UpdateBookmarksSeparatorVisibility();
2167 LayoutAndPaint(); 2165 LayoutAndPaint();
2168 } 2166 }
2169 2167
2170 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2168 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2171 if (UpdateOtherAndManagedButtonsVisibility()) 2169 if (UpdateOtherAndManagedButtonsVisibility())
2172 LayoutAndPaint(); 2170 LayoutAndPaint();
2173 } 2171 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/download/download_item_view_md.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698