diff options
author | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 13:51:53 +0000 |
---|---|---|
committer | satorux@chromium.org <satorux@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-16 13:51:53 +0000 |
commit | c398f7ee9485e90cb163c7e59beab21117c71f4a (patch) | |
tree | e04ebc036b20ef0d163aa0845df3d3682a55b791 /views/controls | |
parent | 2ed13e958eee3490fa83b7299a2223136f36460e (diff) | |
download | chromium_src-c398f7ee9485e90cb163c7e59beab21117c71f4a.zip chromium_src-c398f7ee9485e90cb163c7e59beab21117c71f4a.tar.gz chromium_src-c398f7ee9485e90cb163c7e59beab21117c71f4a.tar.bz2 |
views: Implement a TODO to convert all the callers of the deprecated
constructor of TableView2 to the new one.
BUG=None
TEST=out/Debug/unit_tests --gtest_filter=TableView2Test.*
Patch from Thiago Farina <thiago.farina@gmail.com>
Review URL: http://codereview.chromium.org/1530026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44771 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls')
-rw-r--r-- | views/controls/table/table_view2.cc | 21 | ||||
-rw-r--r-- | views/controls/table/table_view2.h | 5 | ||||
-rw-r--r-- | views/controls/table/table_view_unittest.cc | 2 |
3 files changed, 2 insertions, 26 deletions
diff --git a/views/controls/table/table_view2.cc b/views/controls/table/table_view2.cc index 77d0cff..c76162f 100644 --- a/views/controls/table/table_view2.cc +++ b/views/controls/table/table_view2.cc @@ -16,27 +16,6 @@ namespace views { TableView2::TableView2(TableModel* model, const std::vector<TableColumn>& columns, TableTypes table_type, - bool single_selection, - bool resizable_columns, - bool autosize_columns) - : model_(model), - table_type_(table_type), - table_view_observer_(NULL), - visible_columns_(), - all_columns_(), - column_count_(static_cast<int>(columns.size())), - single_selection_(single_selection), - resizable_columns_(resizable_columns), - autosize_columns_(autosize_columns), - horizontal_lines_(true), - vertical_lines_(false), - native_wrapper_(NULL) { - Init(columns); -} - -TableView2::TableView2(TableModel* model, - const std::vector<TableColumn>& columns, - TableTypes table_type, int options) : model_(model), table_type_(table_type), diff --git a/views/controls/table/table_view2.h b/views/controls/table/table_view2.h index e70e7f2..0f88cde 100644 --- a/views/controls/table/table_view2.h +++ b/views/controls/table/table_view2.h @@ -61,6 +61,7 @@ class TableView2 : public View, public TableModelObserver { // comments next to the corresponding members in TableView2 for details // (ex. SINGLE_SELECTION -> single_selection_). enum Options { + NONE = 0, SINGLE_SELECTION = 1 << 0, RESIZABLE_COLUMNS = 1 << 1, AUTOSIZE_COLUMNS = 1 << 2, @@ -82,11 +83,7 @@ class TableView2 : public View, public TableModelObserver { // Note that setting both resizable_columns and autosize_columns to false is // probably not a good idea, as there is no way for the user to increase a // column's size in that case. - TableView2(TableModel* model, const std::vector<TableColumn>& columns, - TableTypes table_type, bool single_selection, - bool resizable_columns, bool autosize_columns); // |options| is a bitmask of options. See comments at Options. - // TODO(satorux): Convert everyone over to this variant. TableView2(TableModel* model, const std::vector<TableColumn>& columns, TableTypes table_type, int options); virtual ~TableView2(); diff --git a/views/controls/table/table_view_unittest.cc b/views/controls/table/table_view_unittest.cc index 3f87b32..ed69be4 100644 --- a/views/controls/table/table_view_unittest.cc +++ b/views/controls/table/table_view_unittest.cc @@ -454,7 +454,7 @@ void TableView2Test::SetUp() { columns[0].id = 0; columns[1].id = 1; table_ = new views::TableView2(model_.get(), columns, GetTableType(), - false, false, false); + views::TableView2::NONE); window_ = views::Window::CreateChromeWindow(NULL, gfx::Rect(100, 100, 512, 512), this); |