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

Unified Diff: ash/common/system/tray/tray_popup_item_style.h

Issue 2661023006: Remove unused references to NativeTheme in TrayPopupItemStyle. (Closed)
Patch Set: slight improvement Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/tray/tray_popup_item_style.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/tray/tray_popup_item_style.h
diff --git a/ash/common/system/tray/tray_popup_item_style.h b/ash/common/system/tray/tray_popup_item_style.h
index 5fd0b89a994d2f7d84d91de0a6cfab7d3907e98e..bb9465eadaed37846758d686e6de6747475f09cc 100644
--- a/ash/common/system/tray/tray_popup_item_style.h
+++ b/ash/common/system/tray/tray_popup_item_style.h
@@ -8,10 +8,6 @@
#include "base/macros.h"
#include "third_party/skia/include/core/SkColor.h"
-namespace ui {
-class NativeTheme;
-} // namespace ui
-
namespace views {
class Label;
} // namespace views
@@ -21,25 +17,6 @@ namespace ash {
// Central style provider for the system tray menu. Makes it easier to ensure
// all visuals are consistent and easily updated in one spot instead of being
// defined in multiple places throughout the code.
-//
-// Since the TrayPopupItemStyle is based on a NativeTheme you should ensure that
-// when a View's theme changes that a style is re-applied using the new theme.
-// Typically this is done by overriding View::OnNativeThemeChanged() as shown
-// below.
-//
-// It is also important to note that Views call through the virtual function
-// View::GetWidget() when obtaining the NativeTheme. Therefore, Views should not
-// be getting the theme in their own constructors. See https://crbug.com/647376.
-//
-// Example:
-// void OnNativeThemeChanged(const ui::NativeTheme* theme) override {
-// UpdateStyle();
-// }
-//
-// void UpdateStyle() {
-// TrayPopupItemStyle style(GetNativeTheme());
-// style.SetupLabel(label_);
-// }
class TrayPopupItemStyle {
public:
// The different visual styles that a row can have.
@@ -52,8 +29,6 @@ class TrayPopupItemStyle {
DISABLED,
// Color for "Connected" labels.
CONNECTED,
- // Color for sub-section header rows in detailed views.
- SUB_HEADER,
};
// The different font styles that row text can have.
@@ -75,18 +50,11 @@ class TrayPopupItemStyle {
CAPTION,
};
- static SkColor GetIconColor(const ui::NativeTheme* theme,
- ColorStyle color_style);
static SkColor GetIconColor(ColorStyle color_style);
- TrayPopupItemStyle(const ui::NativeTheme* theme, FontStyle font_style);
explicit TrayPopupItemStyle(FontStyle font_style);
~TrayPopupItemStyle();
- const ui::NativeTheme* theme() const { return theme_; }
-
- void set_theme(const ui::NativeTheme* theme) { theme_ = theme; }
-
ColorStyle color_style() const { return color_style_; }
void set_color_style(ColorStyle color_style) { color_style_ = color_style; }
@@ -103,12 +71,6 @@ class TrayPopupItemStyle {
void SetupLabel(views::Label* label) const;
private:
- // The theme that the styles are dervied from.
- // NOTE the styles are not currently derived from |theme_| but see TODO below.
- // TODO(bruthig|tdanderson): Determine if TrayPopupItemStyle should depend on
- // a NativeTheme. See http://crbug.com/665891.
- const ui::NativeTheme* theme_;
-
FontStyle font_style_;
ColorStyle color_style_;
« no previous file with comments | « ash/common/system/tray/tray_item_more.cc ('k') | ash/common/system/tray/tray_popup_item_style.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698