| Index: ui/views/background.cc
|
| diff --git a/ui/views/background.cc b/ui/views/background.cc
|
| index e036490a0c24950c931077dd106f41cbbad5b055..190a5a62c346e714f9b7c4dad8a8d79321132a0d 100644
|
| --- a/ui/views/background.cc
|
| +++ b/ui/views/background.cc
|
| @@ -6,14 +6,11 @@
|
|
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "base/scoped_observer.h"
|
| #include "build/build_config.h"
|
| #include "ui/gfx/canvas.h"
|
| -#include "ui/gfx/color_palette.h"
|
| #include "ui/gfx/color_utils.h"
|
| #include "ui/views/painter.h"
|
| #include "ui/views/view.h"
|
| -#include "ui/views/view_observer.h"
|
|
|
| #if defined(OS_WIN)
|
| #include "skia/ext/skia_utils_win.h"
|
| @@ -37,32 +34,6 @@
|
|
|
| private:
|
| DISALLOW_COPY_AND_ASSIGN(SolidBackground);
|
| -};
|
| -
|
| -// ThemedSolidBackground is a solid background that stays in sync with a view's
|
| -// native theme.
|
| -class ThemedSolidBackground : public SolidBackground, public ViewObserver {
|
| - public:
|
| - explicit ThemedSolidBackground(View* view, ui::NativeTheme::ColorId color_id)
|
| - : SolidBackground(gfx::kPlaceholderColor),
|
| - observer_(this),
|
| - color_id_(color_id) {
|
| - observer_.Add(view);
|
| - OnViewNativeThemeChanged(view);
|
| - }
|
| - ~ThemedSolidBackground() override {}
|
| -
|
| - // ViewObserver:
|
| - void OnViewNativeThemeChanged(View* view) override {
|
| - SetNativeControlColor(view->GetNativeTheme()->GetSystemColor(color_id_));
|
| - view->SchedulePaint();
|
| - }
|
| -
|
| - private:
|
| - ScopedObserver<View, ViewObserver> observer_;
|
| - ui::NativeTheme::ColorId color_id_;
|
| -
|
| - DISALLOW_COPY_AND_ASSIGN(ThemedSolidBackground);
|
| };
|
|
|
| class BackgroundPainter : public Background {
|
| @@ -102,13 +73,6 @@
|
| }
|
|
|
| // static
|
| -Background* Background::CreateThemedSolidBackground(
|
| - View* view,
|
| - ui::NativeTheme::ColorId color_id) {
|
| - return new ThemedSolidBackground(view, color_id);
|
| -}
|
| -
|
| -// static
|
| Background* Background::CreateStandardPanelBackground() {
|
| // TODO(beng): Should be in NativeTheme.
|
| return CreateSolidBackground(SK_ColorWHITE);
|
|
|