| 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/ui/omnibox/omnibox_view.h" | 7 #include "chrome/browser/ui/omnibox/omnibox_view.h" | 
| 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 8 #include "chrome/browser/ui/views/location_bar/location_bar_view.h" | 
| 9 #include "chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.h" | 9 #include "chrome/browser/ui/views/omnibox/inline_omnibox_popup_view.h" | 
| 10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" | 10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" | 
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 300   UpdateBlurRegion(); | 300   UpdateBlurRegion(); | 
| 301 | 301 | 
| 302   // Size our children to the available content area. | 302   // Size our children to the available content area. | 
| 303   LayoutChildren(); | 303   LayoutChildren(); | 
| 304 | 304 | 
| 305   // We need to manually schedule a paint here since we are a layered window and | 305   // We need to manually schedule a paint here since we are a layered window and | 
| 306   // won't implicitly require painting until we ask for one. | 306   // won't implicitly require painting until we ask for one. | 
| 307   SchedulePaint(); | 307   SchedulePaint(); | 
| 308 } | 308 } | 
| 309 | 309 | 
| 310 views::View* OmniboxPopupContentsView::GetEventHandlerForPoint( | 310 views::View* OmniboxPopupContentsView::GetEventHandler(const gfx::Rect& rect, | 
| 311     const gfx::Point& point) { | 311                                                        EventType type) { | 
| 312   return this; | 312   return this; | 
| 313 } | 313 } | 
| 314 | 314 | 
| 315 bool OmniboxPopupContentsView::OnMousePressed( | 315 bool OmniboxPopupContentsView::OnMousePressed( | 
| 316     const ui::MouseEvent& event) { | 316     const ui::MouseEvent& event) { | 
| 317   ignore_mouse_drag_ = false;  // See comment on |ignore_mouse_drag_| in header. | 317   ignore_mouse_drag_ = false;  // See comment on |ignore_mouse_drag_| in header. | 
| 318   if (event.IsLeftMouseButton() || event.IsMiddleMouseButton()) | 318   if (event.IsLeftMouseButton() || event.IsMiddleMouseButton()) | 
| 319     UpdateLineEvent(event, event.IsLeftMouseButton()); | 319     UpdateLineEvent(event, event.IsLeftMouseButton()); | 
| 320   return true; | 320   return true; | 
| 321 } | 321 } | 
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 549   if (HasMatchAt(index) && should_set_selected_line) | 549   if (HasMatchAt(index) && should_set_selected_line) | 
| 550     model_->SetSelectedLine(index, false, false); | 550     model_->SetSelectedLine(index, false, false); | 
| 551 } | 551 } | 
| 552 | 552 | 
| 553 void OmniboxPopupContentsView::OpenSelectedLine( | 553 void OmniboxPopupContentsView::OpenSelectedLine( | 
| 554     const ui::LocatedEvent& event, | 554     const ui::LocatedEvent& event, | 
| 555     WindowOpenDisposition disposition) { | 555     WindowOpenDisposition disposition) { | 
| 556   size_t index = GetIndexForPoint(event.location()); | 556   size_t index = GetIndexForPoint(event.location()); | 
| 557   OpenIndex(index, disposition); | 557   OpenIndex(index, disposition); | 
| 558 } | 558 } | 
| OLD | NEW | 
|---|