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

Unified Diff: chrome/browser/ui/views/frame/glass_browser_frame_view.cc

Issue 380813003: Remove remaining overrides of View::HitTestRect() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: DoesIntersectRect() overrides made private 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/frame/glass_browser_frame_view.cc
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index 0813fa337d1383e5da797c26d503e097c776551e..8d651d8336435458d35bc82b18bf0881de25579c 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -273,15 +273,6 @@ void GlassBrowserFrameView::Layout() {
LayoutClientView();
}
-bool GlassBrowserFrameView::HitTestRect(const gfx::Rect& rect) const {
- bool hit_avatar_button = avatar_button() &&
- avatar_button()->GetMirroredBounds().Intersects(rect);
- bool hit_new_avatar_button = new_avatar_button() &&
- new_avatar_button()->GetMirroredBounds().Intersects(rect);
- return hit_avatar_button || hit_new_avatar_button ||
- !frame()->client_view()->bounds().Intersects(rect);
-}
-
///////////////////////////////////////////////////////////////////////////////
// GlassBrowserFrameView, views::ButtonListener overrides:
void GlassBrowserFrameView::ButtonPressed(views::Button* sender,
@@ -296,6 +287,18 @@ void GlassBrowserFrameView::ButtonPressed(views::Button* sender,
///////////////////////////////////////////////////////////////////////////////
// GlassBrowserFrameView, private:
+// views::NonClientFrameView:
+bool GlassBrowserFrameView::DoesIntersectRect(const views::View* target,
+ const gfx::Rect& rect) const {
+ CHECK_EQ(target, this);
+ bool hit_avatar_button = avatar_button() &&
+ avatar_button()->GetMirroredBounds().Intersects(rect);
+ bool hit_new_avatar_button = new_avatar_button() &&
+ new_avatar_button()->GetMirroredBounds().Intersects(rect);
+ return hit_avatar_button || hit_new_avatar_button ||
+ !frame()->client_view()->bounds().Intersects(rect);
+}
+
int GlassBrowserFrameView::FrameBorderThickness() const {
return (frame()->IsMaximized() || frame()->IsFullscreen()) ?
0 : gfx::win::GetSystemMetricsInDIP(SM_CXSIZEFRAME);
« no previous file with comments | « chrome/browser/ui/views/frame/glass_browser_frame_view.h ('k') | chrome/browser/ui/views/frame/opaque_browser_frame_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698