Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(674)

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc

Issue 265713007: views: Update event-related API to use PointF/RectF instead of Point/Rect. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 "chrome/browser/search/search.h" 9 #include "chrome/browser/search/search.h"
10 #include "chrome/browser/themes/theme_properties.h" 10 #include "chrome/browser/themes/theme_properties.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 void OmniboxPopupContentsView::Layout() { 284 void OmniboxPopupContentsView::Layout() {
285 // Size our children to the available content area. 285 // Size our children to the available content area.
286 LayoutChildren(); 286 LayoutChildren();
287 287
288 // We need to manually schedule a paint here since we are a layered window and 288 // We need to manually schedule a paint here since we are a layered window and
289 // won't implicitly require painting until we ask for one. 289 // won't implicitly require painting until we ask for one.
290 SchedulePaint(); 290 SchedulePaint();
291 } 291 }
292 292
293 views::View* OmniboxPopupContentsView::GetEventHandlerForRect( 293 views::View* OmniboxPopupContentsView::GetEventHandlerForRect(
294 const gfx::Rect& rect) { 294 const gfx::RectF& rect) {
295 return this; 295 return this;
296 } 296 }
297 297
298 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint( 298 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint(
299 const gfx::Point& point) { 299 const gfx::Point& point) {
300 return NULL; 300 return NULL;
301 } 301 }
302 302
303 bool OmniboxPopupContentsView::OnMousePressed( 303 bool OmniboxPopupContentsView::OnMousePressed(
304 const ui::MouseEvent& event) { 304 const ui::MouseEvent& event) {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 size_t index = GetIndexForPoint(event.location()); 492 size_t index = GetIndexForPoint(event.location());
493 if (!HasMatchAt(index)) 493 if (!HasMatchAt(index))
494 return; 494 return;
495 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition, 495 omnibox_view_->OpenMatch(model_->result().match_at(index), disposition,
496 GURL(), base::string16(), index); 496 GURL(), base::string16(), index);
497 } 497 }
498 498
499 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 499 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
500 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 500 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
501 } 501 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698