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

Unified Diff: chromecast/port/ui/native_theme/native_theme_cast.cc

Issue 223143003: Initial checkin of chromecast content embedder (cast_shell) and related build scripts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add an additional function in gl_surface_cast.cc Created 6 years, 9 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
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

Powered by Google App Engine
This is Rietveld 408576698