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

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: patch for landing Created 7 years, 1 month 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 286
287 void OmniboxPopupContentsView::Layout() { 287 void OmniboxPopupContentsView::Layout() {
288 // Size our children to the available content area. 288 // Size our children to the available content area.
289 LayoutChildren(); 289 LayoutChildren();
290 290
291 // We need to manually schedule a paint here since we are a layered window and 291 // We need to manually schedule a paint here since we are a layered window and
292 // won't implicitly require painting until we ask for one. 292 // won't implicitly require painting until we ask for one.
293 SchedulePaint(); 293 SchedulePaint();
294 } 294 }
295 295
296 views::View* OmniboxPopupContentsView::GetEventHandlerForPoint( 296 views::View* OmniboxPopupContentsView::GetEventHandlerForRect(
297 const gfx::Point& point) { 297 const gfx::Rect& rect) {
298 return this; 298 return this;
299 } 299 }
300 300
301 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint( 301 views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint(
302 const gfx::Point& point) { 302 const gfx::Point& point) {
303 return NULL; 303 return NULL;
304 } 304 }
305 305
306 bool OmniboxPopupContentsView::OnMousePressed( 306 bool OmniboxPopupContentsView::OnMousePressed(
307 const ui::MouseEvent& event) { 307 const ui::MouseEvent& event) {
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 // OpenMatch() may close the popup, which will clear the result set and, by 500 // OpenMatch() may close the popup, which will clear the result set and, by
501 // extension, |match| and its contents. So copy the relevant match out to 501 // extension, |match| and its contents. So copy the relevant match out to
502 // make sure it stays alive until the call completes. 502 // make sure it stays alive until the call completes.
503 AutocompleteMatch match = model_->result().match_at(index); 503 AutocompleteMatch match = model_->result().match_at(index);
504 omnibox_view_->OpenMatch(match, disposition, GURL(), index); 504 omnibox_view_->OpenMatch(match, disposition, GURL(), index);
505 } 505 }
506 506
507 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) { 507 OmniboxResultView* OmniboxPopupContentsView::result_view_at(size_t i) {
508 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i))); 508 return static_cast<OmniboxResultView*>(child_at(static_cast<int>(i)));
509 } 509 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698