Index: chromecast/port/ui/native_theme/native_theme_cast.cc |
diff --git a/ui/native_theme/native_theme_gtk.cc b/chromecast/port/ui/native_theme/native_theme_cast.cc |
similarity index 72% |
copy from ui/native_theme/native_theme_gtk.cc |
copy to chromecast/port/ui/native_theme/native_theme_cast.cc |
index e74976678d896a5c621f7dd9bbbca460de137f6d..7fce9a2b1548361cedfd2c02d7d757347adc18d1 100644 |
--- a/ui/native_theme/native_theme_gtk.cc |
+++ b/chromecast/port/ui/native_theme/native_theme_cast.cc |
@@ -1,14 +1,10 @@ |
-// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2014 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "ui/native_theme/native_theme_gtk.h" |
+#include "chromecast/port/ui/native_theme/native_theme_cast.h" |
-#include <gtk/gtk.h> |
- |
-#include "base/basictypes.h" |
#include "base/logging.h" |
-#include "ui/gfx/skia_utils_gtk.h" |
namespace { |
@@ -42,25 +38,18 @@ namespace ui { |
// static |
NativeTheme* NativeTheme::instance() { |
- return NativeThemeGtk::instance(); |
+ return NativeThemeCast::instance(); |
} |
-// static |
-NativeThemeGtk* NativeThemeGtk::instance() { |
- CR_DEFINE_STATIC_LOCAL(NativeThemeGtk, s_native_theme, ()); |
+NativeThemeCast* NativeThemeCast::instance() { |
+ CR_DEFINE_STATIC_LOCAL(NativeThemeCast, s_native_theme, ()); |
return &s_native_theme; |
} |
-SkColor NativeThemeGtk::GetSystemColor(ColorId color_id) const { |
+SkColor NativeThemeCast::GetSystemColor(ColorId color_id) const { |
switch (color_id) { |
case kColorId_DialogBackground: |
- // TODO(benrg): This code used to call gtk_widget_get_style() on the |
- // widget being styled. After refactoring, that widget is not available |
- // and we have to call gtk_widget_get_default_style(). Unfortunately, |
- // it turns out that this breaks everything (chromium bug 105609, |
- // chromium-os bug 23461). Need to figure out the right thing and do it. |
- return gfx::GdkColorToSkColor( |
- gtk_widget_get_default_style()->bg[GTK_STATE_NORMAL]); |
+ return kButtonDisabledColor; |
// FocusableBorder: |
case kColorId_FocusedBorderColor: |
@@ -99,10 +88,10 @@ SkColor NativeThemeGtk::GetSystemColor(ColorId color_id) const { |
return kInvalidColorIdColor; |
} |
-NativeThemeGtk::NativeThemeGtk() { |
+NativeThemeCast::NativeThemeCast() { |
} |
-NativeThemeGtk::~NativeThemeGtk() { |
+NativeThemeCast::~NativeThemeCast() { |
} |
} // namespace ui |