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

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

Issue 2733823003: Move final vector icons out of ui/gfx/vector_icons/ and remove the (Closed)
Patch Set: fix deps Created 3 years, 9 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.h" 5 #include "chrome/browser/ui/views/download/download_item_view.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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 #include "ui/base/theme_provider.h" 50 #include "ui/base/theme_provider.h"
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/vector_icons/vector_icons.h"
61 #include "ui/views/animation/flood_fill_ink_drop_ripple.h" 61 #include "ui/views/animation/flood_fill_ink_drop_ripple.h"
62 #include "ui/views/animation/ink_drop_highlight.h" 62 #include "ui/views/animation/ink_drop_highlight.h"
63 #include "ui/views/animation/ink_drop_impl.h" 63 #include "ui/views/animation/ink_drop_impl.h"
64 #include "ui/views/border.h" 64 #include "ui/views/border.h"
65 #include "ui/views/controls/button/md_text_button.h" 65 #include "ui/views/controls/button/md_text_button.h"
66 #include "ui/views/controls/button/vector_icon_button.h" 66 #include "ui/views/controls/button/vector_icon_button.h"
67 #include "ui/views/controls/focusable_border.h" 67 #include "ui/views/controls/focusable_border.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"
(...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 } 981 }
982 982
983 gfx::ImageSkia DownloadItemView::GetWarningIcon() { 983 gfx::ImageSkia DownloadItemView::GetWarningIcon() {
984 switch (download()->GetDangerType()) { 984 switch (download()->GetDangerType()) {
985 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL: 985 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_URL:
986 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT: 986 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_CONTENT:
987 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT: 987 case content::DOWNLOAD_DANGER_TYPE_UNCOMMON_CONTENT:
988 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST: 988 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_HOST:
989 case content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED: 989 case content::DOWNLOAD_DANGER_TYPE_POTENTIALLY_UNWANTED:
990 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE: 990 case content::DOWNLOAD_DANGER_TYPE_DANGEROUS_FILE:
991 return gfx::CreateVectorIcon(gfx::VectorIconId::WARNING, 991 return gfx::CreateVectorIcon(ui::kWarningIcon, kWarningIconSize,
992 kWarningIconSize, gfx::kGoogleRed700); 992 gfx::kGoogleRed700);
993 993
994 case content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS: 994 case content::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS:
995 case content::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT: 995 case content::DOWNLOAD_DANGER_TYPE_MAYBE_DANGEROUS_CONTENT:
996 case content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED: 996 case content::DOWNLOAD_DANGER_TYPE_USER_VALIDATED:
997 case content::DOWNLOAD_DANGER_TYPE_MAX: 997 case content::DOWNLOAD_DANGER_TYPE_MAX:
998 NOTREACHED(); 998 NOTREACHED();
999 break; 999 break;
1000 } 1000 }
1001 return gfx::ImageSkia(); 1001 return gfx::ImageSkia();
1002 } 1002 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1124 SchedulePaint(); 1124 SchedulePaint();
1125 } 1125 }
1126 1126
1127 SkColor DownloadItemView::GetTextColor() const { 1127 SkColor DownloadItemView::GetTextColor() const {
1128 return GetTextColorForThemeProvider(GetThemeProvider()); 1128 return GetTextColorForThemeProvider(GetThemeProvider());
1129 } 1129 }
1130 1130
1131 SkColor DownloadItemView::GetDimmedTextColor() const { 1131 SkColor DownloadItemView::GetDimmedTextColor() const {
1132 return SkColorSetA(GetTextColor(), 0xC7); 1132 return SkColorSetA(GetTextColor(), 0xC7);
1133 } 1133 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698