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

Unified Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.cc

Issue 403963002: Remove remaining overrides of View::GetEventHandlerForRect() (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/autofill/autofill_dialog_views.cc
diff --git a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
index 2012077a7fb5bcd5678539c4016c737f558d9012..c53ce184a91ec7fe8ab7d6193997ac89fe480075 100644
--- a/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
+++ b/chrome/browser/ui/views/autofill/autofill_dialog_views.cc
@@ -63,6 +63,7 @@
#include "ui/views/layout/grid_layout.h"
#include "ui/views/layout/layout_constants.h"
#include "ui/views/painter.h"
+#include "ui/views/view_targeter.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/dialog_client_view.h"
#include "ui/views/window/non_client_view.h"
@@ -854,6 +855,9 @@ AutofillDialogViews::SectionContainer::SectionContainer(
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kVertical, 0, 0, 0));
AddChildView(label_bar);
AddChildView(controls);
+
+ SetEventTargeter(
+ scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
AutofillDialogViews::SectionContainer::~SectionContainer() {}
@@ -929,12 +933,12 @@ void AutofillDialogViews::SectionContainer::OnGestureEvent(
proxy_button_->OnGestureEvent(event);
}
-views::View* AutofillDialogViews::SectionContainer::GetEventHandlerForRect(
+views::View* AutofillDialogViews::SectionContainer::TargetForRect(
+ views::View* root,
const gfx::Rect& rect) {
- // TODO(tdanderson): Modify this function to support rect-based event
- // targeting.
+ CHECK_EQ(root, this);
+ views::View* handler = views::ViewTargeterDelegate::TargetForRect(root, rect);
- views::View* handler = views::View::GetEventHandlerForRect(rect);
// If the event is not in the label bar and there's no background to be
// cleared, let normal event handling take place.
if (!background() &&
« no previous file with comments | « chrome/browser/ui/views/autofill/autofill_dialog_views.h ('k') | chrome/browser/ui/views/autofill/decorated_textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698