| 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/omnibox_popup_contents_view.h" | 5 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/macros.h" |
| 10 #include "build/build_config.h" |
| 9 #include "chrome/browser/search/search.h" | 11 #include "chrome/browser/search/search.h" |
| 10 #include "chrome/browser/themes/theme_properties.h" | 12 #include "chrome/browser/themes/theme_properties.h" |
| 11 #include "chrome/browser/ui/layout_constants.h" | 13 #include "chrome/browser/ui/layout_constants.h" |
| 12 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 14 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| 13 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" | 15 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" |
| 14 #include "components/omnibox/browser/omnibox_view.h" | 16 #include "components/omnibox/browser/omnibox_view.h" |
| 15 #include "grit/theme_resources.h" | 17 #include "grit/theme_resources.h" |
| 16 #include "ui/base/resource/material_design/material_design_controller.h" | 18 #include "ui/base/resource/material_design/material_design_controller.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
| 18 #include "ui/base/theme_provider.h" | 20 #include "ui/base/theme_provider.h" |
| (...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 size_t index = GetIndexForPoint(event.location()); | 527 size_t index = GetIndexForPoint(event.location()); |
| 526 if (!HasMatchAt(index)) | 528 if (!HasMatchAt(index)) |
| 527 return; | 529 return; |
| 528 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, | 530 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, |
| 529 GURL(), base::string16(), index); | 531 GURL(), base::string16(), index); |
| 530 } | 532 } |
| 531 | 533 |
| 532 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { | 534 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { |
| 533 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); | 535 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); |
| 534 } | 536 } |
| OLD | NEW |