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

Unified Diff: ui/app_list/search_result_list_view.cc

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/app_list/search_result_list_view.h ('k') | ui/views/color_chooser/color_chooser_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/search_result_list_view.cc
===================================================================
--- ui/app_list/search_result_list_view.cc (revision 150588)
+++ ui/app_list/search_result_list_view.cc (working copy)
@@ -10,6 +10,7 @@
#include "base/message_loop.h"
#include "ui/app_list/search_result_view.h"
#include "ui/app_list/search_result_list_view_delegate.h"
+#include "ui/base/event.h"
#include "ui/views/layout/box_layout.h"
namespace {
@@ -72,7 +73,7 @@
result_view;
}
-bool SearchResultListView::OnKeyPressed(const views::KeyEvent& event) {
+bool SearchResultListView::OnKeyPressed(const ui::KeyEvent& event) {
switch (event.key_code()) {
case ui::VKEY_UP:
SetSelectedIndex(std::max(selected_index_ - 1, 0));
@@ -81,8 +82,13 @@
SetSelectedIndex(std::min(selected_index_ + 1, last_visible_index_));
return true;
case ui::VKEY_RETURN:
- if (selected_index_ >= 0)
- ButtonPressed(GetResultViewAt(selected_index_), event);
+ if (selected_index_ >= 0) {
+ // TODO(beng): remove once views::Event is gone.
+ views::MouseEvent synthetic_event(
+ ui::ET_MOUSE_RELEASED, 0, 0,
+ ui::EF_LEFT_MOUSE_BUTTON | event.flags());
+ ButtonPressed(GetResultViewAt(selected_index_), synthetic_event);
+ }
return true;
default:
break;
« no previous file with comments | « ui/app_list/search_result_list_view.h ('k') | ui/views/color_chooser/color_chooser_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698