OLD | NEW |
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 "chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.h" | 5 #include "chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.h" |
6 | 6 |
7 #include "base/compiler_specific.h" | 7 #include "base/compiler_specific.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
10 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 10 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 const ui::MouseEvent& event) { | 278 const ui::MouseEvent& event) { |
279 model_->SetHoveredLine(GetIndexForPoint(event.location())); | 279 model_->SetHoveredLine(GetIndexForPoint(event.location())); |
280 } | 280 } |
281 | 281 |
282 void InlineOmniboxPopupView::OnMouseExited( | 282 void InlineOmniboxPopupView::OnMouseExited( |
283 const ui::MouseEvent& event) { | 283 const ui::MouseEvent& event) { |
284 model_->SetHoveredLine(OmniboxPopupModel::kNoMatch); | 284 model_->SetHoveredLine(OmniboxPopupModel::kNoMatch); |
285 } | 285 } |
286 | 286 |
287 ui::GestureStatus InlineOmniboxPopupView::OnGestureEvent( | 287 ui::GestureStatus InlineOmniboxPopupView::OnGestureEvent( |
288 const views::GestureEvent& event) { | 288 const ui::GestureEvent& event) { |
289 switch (event.type()) { | 289 switch (event.type()) { |
290 case ui::ET_GESTURE_TAP_DOWN: | 290 case ui::ET_GESTURE_TAP_DOWN: |
291 case ui::ET_GESTURE_SCROLL_BEGIN: | 291 case ui::ET_GESTURE_SCROLL_BEGIN: |
292 case ui::ET_GESTURE_SCROLL_UPDATE: | 292 case ui::ET_GESTURE_SCROLL_UPDATE: |
293 UpdateLineEvent(event, true); | 293 UpdateLineEvent(event, true); |
294 break; | 294 break; |
295 case ui::ET_GESTURE_TAP: | 295 case ui::ET_GESTURE_TAP: |
296 case ui::ET_GESTURE_SCROLL_END: | 296 case ui::ET_GESTURE_SCROLL_END: |
297 OpenSelectedLine(event, CURRENT_TAB); | 297 OpenSelectedLine(event, CURRENT_TAB); |
298 break; | 298 break; |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 if (HasMatchAt(index) && should_set_selected_line) | 386 if (HasMatchAt(index) && should_set_selected_line) |
387 model_->SetSelectedLine(index, false, false); | 387 model_->SetSelectedLine(index, false, false); |
388 } | 388 } |
389 | 389 |
390 void InlineOmniboxPopupView::OpenSelectedLine( | 390 void InlineOmniboxPopupView::OpenSelectedLine( |
391 const ui::LocatedEvent& event, | 391 const ui::LocatedEvent& event, |
392 WindowOpenDisposition disposition) { | 392 WindowOpenDisposition disposition) { |
393 size_t index = GetIndexForPoint(event.location()); | 393 size_t index = GetIndexForPoint(event.location()); |
394 OpenIndex(index, disposition); | 394 OpenIndex(index, disposition); |
395 } | 395 } |
OLD | NEW |