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

Side by Side Diff: ui/views/controls/table/table_view_views.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/table/table_view_views.h" 5 #include "ui/views/controls/table/table_view_views.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "ui/base/event.h" 8 #include "ui/base/event.h"
9 #include "ui/base/models/table_model.h" 9 #include "ui/base/models/table_model.h"
10 #include "ui/base/native_theme/native_theme.h" 10 #include "ui/base/native_theme/native_theme.h"
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 Select(selected_row_ + 1); 143 Select(selected_row_ + 1);
144 } 144 }
145 return true; 145 return true;
146 146
147 default: 147 default:
148 break; 148 break;
149 } 149 }
150 return false; 150 return false;
151 } 151 }
152 152
153 bool TableView::OnMousePressed(const MouseEvent& event) { 153 bool TableView::OnMousePressed(const ui::MouseEvent& event) {
154 RequestFocus(); 154 RequestFocus();
155 int row = event.y() / row_height_; 155 int row = event.y() / row_height_;
156 if (row >= 0 && row < RowCount()) { 156 if (row >= 0 && row < RowCount()) {
157 Select(row); 157 Select(row);
158 if (table_view_observer_ && event.flags() & ui::EF_IS_DOUBLE_CLICK) 158 if (table_view_observer_ && event.flags() & ui::EF_IS_DOUBLE_CLICK)
159 table_view_observer_->OnDoubleClick(); 159 table_view_observer_->OnDoubleClick();
160 } 160 }
161 return true; 161 return true;
162 } 162 }
163 163
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 void TableView::NumRowsChanged() { 282 void TableView::NumRowsChanged() {
283 PreferredSizeChanged(); 283 PreferredSizeChanged();
284 SchedulePaint(); 284 SchedulePaint();
285 } 285 }
286 286
287 gfx::Rect TableView::GetRowBounds(int row) { 287 gfx::Rect TableView::GetRowBounds(int row) {
288 return gfx::Rect(0, row * row_height_, width(), row_height_); 288 return gfx::Rect(0, row * row_height_, width(), row_height_);
289 } 289 }
290 290
291 } // namespace views 291 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/controls/table/table_view_views.h ('k') | ui/views/controls/textfield/native_textfield_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698