// Subclass of ScrollView that resets the border when the theme changes.
class ScrollViewWithBorder : public views::ScrollView {
public:
- ScrollViewWithBorder() {
- SetThemeSpecificState();
- }
+ ScrollViewWithBorder() {}
// View overrides;
virtual void OnNativeThemeChanged(const ui::NativeTheme* theme) OVERRIDE {
- SetThemeSpecificState();
- }
-
- private:
- void SetThemeSpecificState() {
SetBorder(Border::CreateSolidBorder(
1,
- GetNativeTheme()->GetSystemColor(
- ui::NativeTheme::kColorId_UnfocusedBorderColor)));
+ theme->GetSystemColor(ui::NativeTheme::kColorId_UnfocusedBorderColor)));
}
+ private:
DISALLOW_COPY_AND_ASSIGN(ScrollViewWithBorder);
};