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

Unified Diff: ui/views/window/non_client_view.cc

Issue 380813003: Remove remaining overrides of View::HitTestRect() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase against ToT 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
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/window/non_client_view.cc
diff --git a/ui/views/window/non_client_view.cc b/ui/views/window/non_client_view.cc
index e4068dba177258768502ef22b8fc0b5f1da27674..d213a1f004e41f08fc4ec001e816ec6ec67dd071 100644
--- a/ui/views/window/non_client_view.cc
+++ b/ui/views/window/non_client_view.cc
@@ -8,6 +8,7 @@
#include "ui/base/hit_test.h"
#include "ui/gfx/rect_conversions.h"
#include "ui/views/rect_based_targeting_utils.h"
+#include "ui/views/view_targeter.h"
#include "ui/views/widget/root_view.h"
#include "ui/views/widget/widget.h"
#include "ui/views/window/client_view.h"
@@ -301,9 +302,12 @@ int NonClientFrameView::GetHTComponentForFrame(const gfx::Point& point,
}
////////////////////////////////////////////////////////////////////////////////
-// NonClientFrameView, View overrides:
+// NonClientFrameView, ViewTargeterDelegate overrides:
+
+bool NonClientFrameView::DoesIntersectRect(const View* target,
+ const gfx::Rect& rect) const {
+ CHECK_EQ(target, this);
-bool NonClientFrameView::HitTestRect(const gfx::Rect& rect) const {
// For the default case, we assume the non-client frame view never overlaps
// the client view.
return !GetWidget()->client_view()->bounds().Intersects(rect);
@@ -326,6 +330,9 @@ void NonClientFrameView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
}
NonClientFrameView::NonClientFrameView() : inactive_rendering_disabled_(false) {
+ // Terry - the right place for this?
sadrul 2014/07/14 16:44:14 This should be the right place to install the defa
tdanderson 2014/07/14 17:28:58 Sorry, left this in by mistake. Removed.
+ SetEventTargeter(
+ scoped_ptr<views::ViewTargeter>(new views::ViewTargeter(this)));
}
} // namespace views
« no previous file with comments | « ui/views/window/non_client_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698