diff options
author | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 22:43:53 +0000 |
---|---|---|
committer | erg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-23 22:43:53 +0000 |
commit | dec76e804867ced17b032571f440adf4945c4d99 (patch) | |
tree | fd798a848d7967b28d89350a55f48285057e2739 /app | |
parent | 0695ef4d095a441148ae80a08576c25c2ab8bc40 (diff) | |
download | chromium_src-dec76e804867ced17b032571f440adf4945c4d99.zip chromium_src-dec76e804867ced17b032571f440adf4945c4d99.tar.gz chromium_src-dec76e804867ced17b032571f440adf4945c4d99.tar.bz2 |
FBTF: Move virtual methods to implementation files.
Remove logging.h and other headers where possible.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/3461019
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60369 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/table_model.cc | 23 | ||||
-rw-r--r-- | app/table_model.h | 21 | ||||
-rw-r--r-- | app/tree_node_model.h | 1 |
3 files changed, 28 insertions, 17 deletions
diff --git a/app/table_model.cc b/app/table_model.cc index b70ad2d..821e14c 100644 --- a/app/table_model.cc +++ b/app/table_model.cc @@ -6,6 +6,7 @@ #include "app/l10n_util.h" #include "app/l10n_util_collator.h" +#include "base/logging.h" #include "third_party/skia/include/core/SkBitmap.h" // TableColumn ----------------------------------------------------------------- @@ -75,6 +76,28 @@ SkBitmap TableModel::GetIcon(int row) { return SkBitmap(); } +std::wstring TableModel::GetTooltip(int row) { + return std::wstring(); +} + +bool TableModel::HasGroups() { + return false; +} + +TableModel::Groups TableModel::GetGroups() { + // If you override HasGroups to return true, you must override this as + // well. + NOTREACHED(); + return std::vector<Group>(); +} + +int TableModel::GetGroupID(int row) { + // If you override HasGroups to return true, you must override this as + // well. + NOTREACHED(); + return 0; +} + int TableModel::CompareValues(int row1, int row2, int column_id) { DCHECK(row1 >= 0 && row1 < RowCount() && row2 >= 0 && row2 < RowCount()); diff --git a/app/table_model.h b/app/table_model.h index 60637f0..baae390 100644 --- a/app/table_model.h +++ b/app/table_model.h @@ -9,7 +9,6 @@ #include <string> #include <vector> -#include "base/logging.h" #include "unicode/coll.h" class SkBitmap; @@ -44,9 +43,7 @@ class TableModel { // Returns the tooltip, if any, to show for a particular row. If there are // multiple columns in the row, this will only be shown when hovering over // column zero. - virtual std::wstring GetTooltip(int row) { - return std::wstring(); - } + virtual std::wstring GetTooltip(int row); // Returns true if the TableView has groups. Groups provide a way to visually // delineate the rows in a table view. When groups are enabled table view @@ -54,25 +51,15 @@ class TableModel { // the group. // // On win2k a visual separator is not rendered for the group headers. - virtual bool HasGroups() { return false; } + virtual bool HasGroups(); // Returns the groups. // This is only used if HasGroups returns true. - virtual Groups GetGroups() { - // If you override HasGroups to return true, you must override this as - // well. - NOTREACHED(); - return std::vector<Group>(); - } + virtual Groups GetGroups(); // Returns the group id of the specified row. // This is only used if HasGroups returns true. - virtual int GetGroupID(int row) { - // If you override HasGroups to return true, you must override this as - // well. - NOTREACHED(); - return 0; - } + virtual int GetGroupID(int row); // Sets the observer for the model. The TableView should NOT take ownership // of the observer. diff --git a/app/tree_node_model.h b/app/tree_node_model.h index ac6475b..3f21971 100644 --- a/app/tree_node_model.h +++ b/app/tree_node_model.h @@ -11,6 +11,7 @@ #include "app/tree_model.h" #include "base/basictypes.h" +#include "base/logging.h" #include "base/observer_list.h" #include "base/scoped_ptr.h" #include "base/scoped_vector.h" |