OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #include "chrome/browser/ui/views/options/content_exceptions_table_view.h" | |
6 | |
7 #include "ui/gfx/font.h" | |
8 | |
9 ContentExceptionsTableView::ContentExceptionsTableView( | |
10 ContentExceptionsTableModel* model, | |
11 const std::vector<TableColumn>& columns) | |
12 : views::TableView(model, columns, views::TEXT_ONLY, false, true, false), | |
13 exceptions_(model) { | |
14 SetCustomColorsEnabled(true); | |
15 } | |
16 | |
17 bool ContentExceptionsTableView::GetCellColors(int model_row, | |
18 int column, | |
19 ItemColor* foreground, | |
20 ItemColor* background, | |
21 LOGFONT* logfont) { | |
22 if (!exceptions_->entry_is_off_the_record(model_row)) | |
23 return false; | |
24 | |
25 foreground->color_is_set = false; | |
26 background->color_is_set = false; | |
27 | |
28 gfx::Font font; | |
29 font = font.DeriveFont(0, gfx::Font::ITALIC); | |
30 HFONT hf = font.GetNativeFont(); | |
31 GetObject(hf, sizeof(LOGFONT), logfont); | |
32 return true; | |
33 } | |
OLD | NEW |