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

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

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: DrawingDisplayItem Created 3 years, 10 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 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 // Fetch the already-loaded icon. 723 // Fetch the already-loaded icon.
724 IconManager* im = g_browser_process->icon_manager(); 724 IconManager* im = g_browser_process->icon_manager();
725 gfx::Image* icon = im->LookupIconFromFilepath(download()->GetTargetFilePath(), 725 gfx::Image* icon = im->LookupIconFromFilepath(download()->GetTargetFilePath(),
726 IconLoader::SMALL); 726 IconLoader::SMALL);
727 if (!icon) 727 if (!icon)
728 return; 728 return;
729 729
730 // Draw the icon image. 730 // Draw the icon image.
731 int icon_x = progress_x + DownloadShelf::kFiletypeIconOffset; 731 int icon_x = progress_x + DownloadShelf::kFiletypeIconOffset;
732 int icon_y = progress_y + DownloadShelf::kFiletypeIconOffset; 732 int icon_y = progress_y + DownloadShelf::kFiletypeIconOffset;
733 SkPaint paint; 733 cc::PaintFlags paint;
734 // Use an alpha to make the image look disabled. 734 // Use an alpha to make the image look disabled.
735 if (!enabled()) 735 if (!enabled())
736 paint.setAlpha(120); 736 paint.setAlpha(120);
737 canvas->DrawImageInt(*icon->ToImageSkia(), icon_x, icon_y, paint); 737 canvas->DrawImageInt(*icon->ToImageSkia(), icon_x, icon_y, paint);
738 } 738 }
739 739
740 void DownloadItemView::OnFocus() { 740 void DownloadItemView::OnFocus() {
741 View::OnFocus(); 741 View::OnFocus();
742 // We render differently when focused. 742 // We render differently when focused.
743 SchedulePaint(); 743 SchedulePaint();
(...skipping 380 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
« no previous file with comments | « chrome/browser/ui/views/create_application_shortcut_view.cc ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698