diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-09 07:35:32 +0000 |
commit | 213dac2f0bff9162502fe325b6ebb85a255efcb2 (patch) | |
tree | 3640cb1f19976e38677b8632537d2d41f8444d0f /chrome/browser/ui/views/options/content_exceptions_table_view.cc | |
parent | 6de53d401aa8dc6c7e0a9874c71a95ce88ade50d (diff) | |
download | chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.zip chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.gz chromium_src-213dac2f0bff9162502fe325b6ebb85a255efcb2.tar.bz2 |
Move browser/views to browser/ui/views
TBR=brettw
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/4694005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65508 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/options/content_exceptions_table_view.cc')
-rw-r--r-- | chrome/browser/ui/views/options/content_exceptions_table_view.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/chrome/browser/ui/views/options/content_exceptions_table_view.cc b/chrome/browser/ui/views/options/content_exceptions_table_view.cc new file mode 100644 index 0000000..1b81aa1 --- /dev/null +++ b/chrome/browser/ui/views/options/content_exceptions_table_view.cc @@ -0,0 +1,33 @@ +// Copyright (c) 2010 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 "chrome/browser/views/options/content_exceptions_table_view.h" + +#include "gfx/font.h" + +ContentExceptionsTableView::ContentExceptionsTableView( + ContentExceptionsTableModel* model, + const std::vector<TableColumn>& columns) + : views::TableView(model, columns, views::TEXT_ONLY, false, true, false), + exceptions_(model) { + SetCustomColorsEnabled(true); +} + +bool ContentExceptionsTableView::GetCellColors(int model_row, + int column, + ItemColor* foreground, + ItemColor* background, + LOGFONT* logfont) { + if (!exceptions_->entry_is_off_the_record(model_row)) + return false; + + foreground->color_is_set = false; + background->color_is_set = false; + + gfx::Font font; + font = font.DeriveFont(0, gfx::Font::ITALIC); + HFONT hf = font.GetNativeFont(); + GetObject(hf, sizeof(LOGFONT), logfont); + return true; +} |