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

Unified Diff: ui/views/controls/table/table_view.h

Issue 2780833004: Improve TableView unit tests and fix bugs that were uncovered. (Closed)
Patch Set: docs Created 3 years, 9 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 | « no previous file | ui/views/controls/table/table_view.cc » ('j') | ui/views/controls/table/table_view.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/table/table_view.h
diff --git a/ui/views/controls/table/table_view.h b/ui/views/controls/table/table_view.h
index e6524ecfbf130f6dbcc127ca24554fe5ad59df32..d98147412d30779a99c877b9d9c1b008fce84d50 100644
--- a/ui/views/controls/table/table_view.h
+++ b/ui/views/controls/table/table_view.h
@@ -8,6 +8,7 @@
#include <vector>
#include "base/macros.h"
+#include "base/memory/weak_ptr.h"
#include "ui/base/models/list_selection_model.h"
#include "ui/base/models/table_model.h"
#include "ui/base/models/table_model_observer.h"
@@ -296,6 +297,11 @@ class VIEWS_EXPORT TableView
base::string16* tooltip,
gfx::Point* tooltip_origin) const;
+ // Selects the first row if the table has focus and no row is currently
+ // selected. This is a delayed task posted by OnFocus because things that
+ // request focus are also likely to select a row or rows.
+ void SelectFirstRowIfNoneSelected();
+
ui::TableModel* model_;
std::vector<ui::TableColumn> columns_;
@@ -347,6 +353,8 @@ class VIEWS_EXPORT TableView
// True if in SetVisibleColumnWidth().
bool in_set_visible_column_width_;
+ base::WeakPtrFactory<TableView> weak_factory_;
+
DISALLOW_COPY_AND_ASSIGN(TableView);
};
« no previous file with comments | « no previous file | ui/views/controls/table/table_view.cc » ('j') | ui/views/controls/table/table_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698