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

Side by Side Diff: chrome/browser/ui/views/download/download_item_view_md.cc

Issue 1937103003: Rename of InkDropAnimation classes to InkDropRipple. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
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/download/download_item_view_md.h" 5 #include "chrome/browser/ui/views/download/download_item_view_md.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <vector> 10 #include <vector>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 #include "ui/events/event.h" 51 #include "ui/events/event.h"
52 #include "ui/gfx/animation/slide_animation.h" 52 #include "ui/gfx/animation/slide_animation.h"
53 #include "ui/gfx/canvas.h" 53 #include "ui/gfx/canvas.h"
54 #include "ui/gfx/color_palette.h" 54 #include "ui/gfx/color_palette.h"
55 #include "ui/gfx/color_utils.h" 55 #include "ui/gfx/color_utils.h"
56 #include "ui/gfx/image/image.h" 56 #include "ui/gfx/image/image.h"
57 #include "ui/gfx/paint_vector_icon.h" 57 #include "ui/gfx/paint_vector_icon.h"
58 #include "ui/gfx/text_elider.h" 58 #include "ui/gfx/text_elider.h"
59 #include "ui/gfx/text_utils.h" 59 #include "ui/gfx/text_utils.h"
60 #include "ui/gfx/vector_icons_public.h" 60 #include "ui/gfx/vector_icons_public.h"
61 #include "ui/views/animation/flood_fill_ink_drop_animation.h" 61 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
62 #include "ui/views/animation/ink_drop_delegate.h" 62 #include "ui/views/animation/ink_drop_delegate.h"
63 #include "ui/views/animation/ink_drop_hover.h" 63 #include "ui/views/animation/ink_drop_hover.h"
64 #include "ui/views/border.h" 64 #include "ui/views/border.h"
65 #include "ui/views/controls/button/image_button.h" 65 #include "ui/views/controls/button/image_button.h"
66 #include "ui/views/controls/button/label_button.h" 66 #include "ui/views/controls/button/label_button.h"
67 #include "ui/views/controls/button/md_text_button.h" 67 #include "ui/views/controls/button/md_text_button.h"
68 #include "ui/views/controls/label.h" 68 #include "ui/views/controls/label.h"
69 #include "ui/views/mouse_constants.h" 69 #include "ui/views/mouse_constants.h"
70 #include "ui/views/widget/root_view.h" 70 #include "ui/views/widget/root_view.h"
71 #include "ui/views/widget/widget.h" 71 #include "ui/views/widget/widget.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 SchedulePaint(); 466 SchedulePaint();
467 } 467 }
468 468
469 void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) { 469 void DownloadItemViewMd::AddInkDropLayer(ui::Layer* ink_drop_layer) {
470 InkDropHostView::AddInkDropLayer(ink_drop_layer); 470 InkDropHostView::AddInkDropLayer(ink_drop_layer);
471 // The layer that's added to host the ink drop layer must mask to bounds 471 // The layer that's added to host the ink drop layer must mask to bounds
472 // so the hover effect is clipped while animating open. 472 // so the hover effect is clipped while animating open.
473 layer()->SetMasksToBounds(true); 473 layer()->SetMasksToBounds(true);
474 } 474 }
475 475
476 std::unique_ptr<views::InkDropAnimation> 476 std::unique_ptr<views::InkDropRipple> DownloadItemViewMd::CreateInkDropRipple()
477 DownloadItemViewMd::CreateInkDropAnimation() const { 477 const {
478 return base::WrapUnique(new views::FloodFillInkDropAnimation( 478 return base::WrapUnique(new views::FloodFillInkDropRipple(
479 GetLocalBounds(), ink_drop_delegate_.last_ink_drop_location(), 479 GetLocalBounds(), ink_drop_delegate_.last_ink_drop_location(),
480 color_utils::DeriveDefaultIconColor(GetTextColor()))); 480 color_utils::DeriveDefaultIconColor(GetTextColor())));
481 } 481 }
482 482
483 std::unique_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover() 483 std::unique_ptr<views::InkDropHover> DownloadItemViewMd::CreateInkDropHover()
484 const { 484 const {
485 if (IsShowingWarningDialog()) 485 if (IsShowingWarningDialog())
486 return nullptr; 486 return nullptr;
487 487
488 gfx::Size size = GetPreferredSize(); 488 gfx::Size size = GetPreferredSize();
(...skipping 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 SchedulePaint(); 1117 SchedulePaint();
1118 } 1118 }
1119 1119
1120 SkColor DownloadItemViewMd::GetTextColor() const { 1120 SkColor DownloadItemViewMd::GetTextColor() const {
1121 return GetTextColorForThemeProvider(GetThemeProvider()); 1121 return GetTextColorForThemeProvider(GetThemeProvider());
1122 } 1122 }
1123 1123
1124 SkColor DownloadItemViewMd::GetDimmedTextColor() const { 1124 SkColor DownloadItemViewMd::GetDimmedTextColor() const {
1125 return SkColorSetA(GetTextColor(), 0xC7); 1125 return SkColorSetA(GetTextColor(), 0xC7);
1126 } 1126 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698