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

Unified Diff: ui/base/native_theme/native_theme_gtk.cc

Issue 10387121: Revert 136996 - ui: Move NativeTheme files into ui/base/native_theme/ directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 7 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 | « ui/base/native_theme/native_theme_gtk.h ('k') | ui/base/native_theme/native_theme_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/native_theme/native_theme_gtk.cc
===================================================================
--- ui/base/native_theme/native_theme_gtk.cc (revision 137002)
+++ ui/base/native_theme/native_theme_gtk.cc (working copy)
@@ -1,87 +0,0 @@
-// Copyright (c) 2012 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/base/native_theme/native_theme_gtk.h"
-
-#include <gtk/gtk.h>
-
-#include "base/basictypes.h"
-#include "base/logging.h"
-#include "ui/gfx/skia_utils_gtk.h"
-
-namespace {
-
-const SkColor kInvalidColorIdColor = SkColorSetRGB(255, 0, 128);
-
-// Theme colors returned by GetSystemColor().
-
-// FocusableBorder:
-const SkColor kFocusedBorderColor = SkColorSetRGB(0x4D, 0x90, 0xFE);
-const SkColor kUnfocusedBorderColor = SkColorSetRGB(0xD9, 0xD9, 0xD9);
-
-// TextButton:
-const SkColor kTextButtonBackgroundColor = SkColorSetRGB(0xde, 0xde, 0xde);
-const SkColor kTextButtonEnabledColor = SkColorSetRGB(6, 45, 117);
-const SkColor kTextButtonDisabledColor = SkColorSetRGB(161, 161, 146);
-const SkColor kTextButtonHighlightColor = SkColorSetARGB(200, 255, 255, 255);
-const SkColor kTextButtonHoverColor = kTextButtonEnabledColor;
-
-} // namespace
-
-namespace ui {
-
-// static
-const NativeTheme* NativeTheme::instance() {
- return NativeThemeGtk::instance();
-}
-
-// static
-const NativeThemeGtk* NativeThemeGtk::instance() {
- CR_DEFINE_STATIC_LOCAL(NativeThemeGtk, s_native_theme, ());
- return &s_native_theme;
-}
-
-SkColor NativeThemeGtk::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]);
-
- // FocusableBorder:
- case kColorId_FocusedBorderColor:
- return kFocusedBorderColor;
- case kColorId_UnfocusedBorderColor:
- return kUnfocusedBorderColor;
-
- // TextButton:
- case kColorId_TextButtonBackgroundColor:
- return kTextButtonBackgroundColor;
- case kColorId_TextButtonEnabledColor:
- return kTextButtonEnabledColor;
- case kColorId_TextButtonDisabledColor:
- return kTextButtonDisabledColor;
- case kColorId_TextButtonHighlightColor:
- return kTextButtonHighlightColor;
- case kColorId_TextButtonHoverColor:
- return kTextButtonHoverColor;
-
- default:
- NOTREACHED() << "Invalid color_id: " << color_id;
- break;
- }
- return kInvalidColorIdColor;
-}
-
-NativeThemeGtk::NativeThemeGtk() {
-}
-
-NativeThemeGtk::~NativeThemeGtk() {
-}
-
-} // namespace ui
« no previous file with comments | « ui/base/native_theme/native_theme_gtk.h ('k') | ui/base/native_theme/native_theme_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698