| Index: ui/app_list/views/search_box_view.cc
|
| diff --git a/ui/app_list/views/search_box_view.cc b/ui/app_list/views/search_box_view.cc
|
| index 45f30f10e33ed59701d0bb5eb7fc6639b8adf15f..e3b26eba12a719c8d6b462e162b0adcedc8946ce 100644
|
| --- a/ui/app_list/views/search_box_view.cc
|
| +++ b/ui/app_list/views/search_box_view.cc
|
| @@ -29,6 +29,7 @@
|
| #include "ui/gfx/canvas.h"
|
| #include "ui/gfx/color_utils.h"
|
| #include "ui/gfx/geometry/insets.h"
|
| +#include "ui/gfx/geometry/vector2d_conversions.h"
|
| #include "ui/gfx/paint_vector_icon.h"
|
| #include "ui/gfx/shadow_value.h"
|
| #include "ui/strings/grit/ui_strings.h"
|
| @@ -276,20 +277,23 @@ bool SearchBoxView::MoveTabFocus(bool move_backwards) {
|
| case FOCUS_SEARCH_BOX:
|
| if (move_backwards) {
|
| focused_view_ = back_button_ && back_button_->visible()
|
| - ? FOCUS_BACK_BUTTON : FOCUS_SEARCH_BOX;
|
| + ? FOCUS_BACK_BUTTON
|
| + : FOCUS_SEARCH_BOX;
|
| } else {
|
| focused_view_ = speech_button_ && speech_button_->visible()
|
| - ? FOCUS_MIC_BUTTON : FOCUS_CONTENTS_VIEW;
|
| + ? FOCUS_MIC_BUTTON
|
| + : FOCUS_CONTENTS_VIEW;
|
| }
|
| break;
|
| case FOCUS_MIC_BUTTON:
|
| focused_view_ = move_backwards ? FOCUS_SEARCH_BOX : FOCUS_CONTENTS_VIEW;
|
| break;
|
| case FOCUS_CONTENTS_VIEW:
|
| - focused_view_ = move_backwards
|
| - ? (speech_button_ && speech_button_->visible() ?
|
| - FOCUS_MIC_BUTTON : FOCUS_SEARCH_BOX)
|
| - : FOCUS_CONTENTS_VIEW;
|
| + focused_view_ =
|
| + move_backwards
|
| + ? (speech_button_ && speech_button_->visible() ? FOCUS_MIC_BUTTON
|
| + : FOCUS_SEARCH_BOX)
|
| + : FOCUS_CONTENTS_VIEW;
|
| break;
|
| default:
|
| DCHECK(false);
|
| @@ -351,10 +355,20 @@ void SearchBoxView::ShowBackOrGoogleIcon(bool show_back_button) {
|
| content_container_->Layout();
|
| }
|
|
|
| +void SearchBoxView::OnMouseEvent(ui::MouseEvent* event) {
|
| + if (!is_fullscreen_app_list_enabled_)
|
| + return;
|
| +
|
| + if (event->type() != ui::ET_MOUSEWHEEL)
|
| + return;
|
| +
|
| + if (app_list_view_->HandleScroll(event))
|
| + event->SetHandled();
|
| +}
|
| +
|
| bool SearchBoxView::OnMouseWheel(const ui::MouseWheelEvent& event) {
|
| if (contents_view_)
|
| return contents_view_->OnMouseWheel(event);
|
| -
|
| return false;
|
| }
|
|
|
| @@ -441,6 +455,17 @@ bool SearchBoxView::HandleKeyEvent(views::Textfield* sender,
|
| return false;
|
| }
|
|
|
| +bool SearchBoxView::HandleMouseEvent(views::Textfield* sender,
|
| + const ui::MouseEvent& mouse_event) {
|
| + if (!is_fullscreen_app_list_enabled_)
|
| + return false;
|
| +
|
| + if (mouse_event.type() != ui::ET_MOUSEWHEEL)
|
| + return false;
|
| +
|
| + return app_list_view_->HandleScroll(&mouse_event);
|
| +}
|
| +
|
| void SearchBoxView::ButtonPressed(views::Button* sender,
|
| const ui::Event& event) {
|
| if (back_button_ && sender == back_button_)
|
|
|