OLD | NEW |
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 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
499 ink_drop_visible_opacity())); | 499 ink_drop_visible_opacity())); |
500 } | 500 } |
501 | 501 |
502 std::unique_ptr<views::InkDropHighlight> | 502 std::unique_ptr<views::InkDropHighlight> |
503 DownloadItemViewMd::CreateInkDropHighlight() const { | 503 DownloadItemViewMd::CreateInkDropHighlight() const { |
504 if (IsShowingWarningDialog()) | 504 if (IsShowingWarningDialog()) |
505 return nullptr; | 505 return nullptr; |
506 | 506 |
507 gfx::Size size = GetPreferredSize(); | 507 gfx::Size size = GetPreferredSize(); |
508 return base::WrapUnique(new views::InkDropHighlight( | 508 return base::WrapUnique(new views::InkDropHighlight( |
509 size, kInkDropSmallCornerRadius, gfx::Rect(size).CenterPoint(), | 509 size, kInkDropSmallCornerRadius, |
| 510 gfx::RectF(gfx::SizeF(size)).CenterPoint(), |
510 color_utils::DeriveDefaultIconColor(GetTextColor()))); | 511 color_utils::DeriveDefaultIconColor(GetTextColor()))); |
511 } | 512 } |
512 | 513 |
513 void DownloadItemViewMd::OnGestureEvent(ui::GestureEvent* event) { | 514 void DownloadItemViewMd::OnGestureEvent(ui::GestureEvent* event) { |
514 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { | 515 if (event->type() == ui::ET_GESTURE_TAP_DOWN) { |
515 HandlePressEvent(*event, true); | 516 HandlePressEvent(*event, true); |
516 event->SetHandled(); | 517 event->SetHandled(); |
517 return; | 518 return; |
518 } | 519 } |
519 | 520 |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1137 SchedulePaint(); | 1138 SchedulePaint(); |
1138 } | 1139 } |
1139 | 1140 |
1140 SkColor DownloadItemViewMd::GetTextColor() const { | 1141 SkColor DownloadItemViewMd::GetTextColor() const { |
1141 return GetTextColorForThemeProvider(GetThemeProvider()); | 1142 return GetTextColorForThemeProvider(GetThemeProvider()); |
1142 } | 1143 } |
1143 | 1144 |
1144 SkColor DownloadItemViewMd::GetDimmedTextColor() const { | 1145 SkColor DownloadItemViewMd::GetDimmedTextColor() const { |
1145 return SkColorSetA(GetTextColor(), 0xC7); | 1146 return SkColorSetA(GetTextColor(), 0xC7); |
1146 } | 1147 } |
OLD | NEW |