| 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 "chrome/browser/search/search.h" | 7 #include "chrome/browser/search/search.h" |
| 8 #include "chrome/browser/themes/theme_properties.h" | 8 #include "chrome/browser/themes/theme_properties.h" |
| 9 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 9 #include "chrome/browser/ui/omnibox/omnibox_view.h" |
| 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 10 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 | 290 |
| 291 void OmniboxPopupContentsView::Layout() { | 291 void OmniboxPopupContentsView::Layout() { |
| 292 // Size our children to the available content area. | 292 // Size our children to the available content area. |
| 293 LayoutChildren(); | 293 LayoutChildren(); |
| 294 | 294 |
| 295 // We need to manually schedule a paint here since we are a layered window and | 295 // We need to manually schedule a paint here since we are a layered window and |
| 296 // won't implicitly require painting until we ask for one. | 296 // won't implicitly require painting until we ask for one. |
| 297 SchedulePaint(); | 297 SchedulePaint(); |
| 298 } | 298 } |
| 299 | 299 |
| 300 views::View* OmniboxPopupContentsView::GetEventHandlerForPoint( | 300 views::View* OmniboxPopupContentsView::GetEventHandlerForRect( |
| 301 const gfx::Point& point) { | 301 const gfx::Rect& rect) { |
| 302 return this; | 302 return this; |
| 303 } | 303 } |
| 304 | 304 |
| 305 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint( | 305 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint( |
| 306 const gfx::Point& point) { | 306 const gfx::Point& point) { |
| 307 return NULL; | 307 return NULL; |
| 308 } | 308 } |
| 309 | 309 |
| 310 bool OmniboxPopupContentsView::OnMousePressed( | 310 bool OmniboxPopupContentsView::OnMousePressed( |
| 311 const ui::MouseEvent& event) { | 311 const ui::MouseEvent& event) { |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 // OpenMatch() may close the popup, which will clear the result set and, by | 504 // OpenMatch() may close the popup, which will clear the result set and, by |
| 505 // extension, |match| and its contents. So copy the relevant match out to | 505 // extension, |match| and its contents. So copy the relevant match out to |
| 506 // make sure it stays alive until the call completes. | 506 // make sure it stays alive until the call completes. |
| 507 AutocompleteMatch match = model_->result().match_at(index); | 507 AutocompleteMatch match = model_->result().match_at(index); |
| 508 omnibox_view_->OpenMatch(match, disposition, GURL(), index); | 508 omnibox_view_->OpenMatch(match, disposition, GURL(), index); |
| 509 } | 509 } |
| 510 | 510 |
| 511 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { | 511 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { |
| 512 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); | 512 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); |
| 513 } | 513 } |
| OLD | NEW |