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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc

Issue 381323002: [rough WIP] Make View::GetEventHandlerForRect() non-virtual (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
index 36226272979c96eba1cf321a250e3e33b9ea29b9..5ecb89c9bf448c10c3551f677d1c8dbab1502b64 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
@@ -17,6 +17,7 @@
#include "ui/gfx/image/image.h"
#include "ui/gfx/path.h"
#include "ui/views/controls/image_view.h"
+#include "ui/views/view_targeter.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/non_client_view.h"
#include "ui/wm/core/window_animations.h"
@@ -70,6 +71,9 @@ OmniboxPopupContentsView::OmniboxPopupContentsView(
ui::ThemeProvider* theme = location_bar_view_->GetThemeProvider();
bottom_shadow_ = theme->GetImageSkiaNamed(IDR_BUBBLE_B);
+
+ SetEventTargeter(
+ scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
void OmniboxPopupContentsView::Init() {
@@ -289,11 +293,6 @@ void OmniboxPopupContentsView::Layout() {
SchedulePaint();
}
-views::View* OmniboxPopupContentsView::GetEventHandlerForRect(
- const gfx::Rect& rect) {
- return this;
-}
-
views::View* OmniboxPopupContentsView::GetTooltipHandlerForPoint(
const gfx::Point& point) {
return NULL;
@@ -440,6 +439,13 @@ void OmniboxPopupContentsView::PaintChildren(gfx::Canvas* canvas,
////////////////////////////////////////////////////////////////////////////////
// OmniboxPopupContentsView, private:
+views::View* OmniboxPopupContentsView::TargetForRect(
+ views::View* root,
+ const gfx::Rect& rect) {
+ CHECK_EQ(root, this);
+ return this;
+}
+
bool OmniboxPopupContentsView::HasMatchAt(size_t index) const {
return index < model_->result().size();
}

Powered by Google App Engine
This is Rietveld 408576698