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

Unified Diff: chrome/browser/ui/views/download/download_item_view_md.h

Issue 1408223008: [MD] Share button code between find bar and download shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: one more place Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/download/download_item_view_md.h
diff --git a/chrome/browser/ui/views/download/download_item_view_md.h b/chrome/browser/ui/views/download/download_item_view_md.h
index 2d6990633b16f031aa6e0c79bb1610df74d5075a..2d646dbbe372b74e44c1f0229ea1e3925ecf3223 100644
--- a/chrome/browser/ui/views/download/download_item_view_md.h
+++ b/chrome/browser/ui/views/download/download_item_view_md.h
@@ -35,6 +35,7 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/view.h"
+class BarControlButton;
class DownloadShelfView;
class DownloadShelfContextMenuView;
@@ -48,6 +49,10 @@ class ImageSkia;
class SlideAnimation;
}
+namespace ui {
+class ThemeProvider;
+}
+
namespace views {
class ImageButton;
class Label;
@@ -71,6 +76,9 @@ class DownloadItemViewMd : public views::ButtonListener,
void StartDownloadProgress();
void StopDownloadProgress();
+ // Returns the base color for text on this download item, based on |theme|.
+ static SkColor GetTextColorForThemeProvider(ui::ThemeProvider* theme);
+
// IconManager::Client interface.
void OnExtractIconComplete(gfx::Image* icon);
@@ -205,6 +213,12 @@ class DownloadItemViewMd : public views::ButtonListener,
State to,
gfx::SlideAnimation* animation);
+ // Returns the base text color.
+ SkColor GetTextColor();
+
+ // Returns a slightly dimmed version of the base text color.
+ SkColor GetDimmedTextColor();
+
// The download shelf that owns us.
DownloadShelfView* shelf_;
@@ -264,7 +278,7 @@ class DownloadItemViewMd : public views::ButtonListener,
views::LabelButton* discard_button_;
// The drop down button.
- views::ImageButton* dropdown_button_;
+ BarControlButton* dropdown_button_;
// Dangerous mode label.
views::Label* dangerous_download_label_;

Powered by Google App Engine
This is Rietveld 408576698