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

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

Issue 22891016: Add support for rect-based event targeting in views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tab strip problems addressed Created 7 years, 2 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 "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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 300
301 void OmniboxPopupContentsView::Layout() { 301 void OmniboxPopupContentsView::Layout() {
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::GetEventHandlerForRect(
311 const gfx::Point& point) { 311 const gfx::Rect& rect) {
312 return this; 312 return this;
313 } 313 }
314 314
315 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint( 315 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint(
316 const gfx::Point& point) { 316 const gfx::Point& point) {
317 return NULL; 317 return NULL;
318 } 318 }
319 319
320 bool OmniboxPopupContentsView::OnMousePressed( 320 bool OmniboxPopupContentsView::OnMousePressed(
321 const ui::MouseEvent& event) { 321 const ui::MouseEvent& event) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 // OpenMatch() may close the popup, which will clear the result set and, by 514 // OpenMatch() may close the popup, which will clear the result set and, by
515 // extension, |match| and its contents. So copy the relevant match out to 515 // extension, |match| and its contents. So copy the relevant match out to
516 // make sure it stays alive until the call completes. 516 // make sure it stays alive until the call completes.
517 AutocompleteMatch match = model_->result().match_at(index); 517 AutocompleteMatch match = model_->result().match_at(index);
518 omnibox_view_->OpenMatch(match, disposition, GURL(), index); 518 omnibox_view_->OpenMatch(match, disposition, GURL(), index);
519 } 519 }
520 520
521 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 521 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
522 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 522 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
523 } 523 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698