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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.h

Issue 22891016: Add support for rect-based event targeting in views (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments addressed Created 7 years, 3 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/tabs/tab_strip.h
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h
index 9ace500829588fb914a2e0d59308b578a117c666..5dd2339adbfa4ce48133cea4c4f2e71b054e78b1 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.h
+++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -161,6 +161,10 @@ class TabStrip : public views::View,
// window caption area of the browser window.
bool IsPositionInWindowCaption(const gfx::Point& point);
+ // Returns true if the specified rect (in TabStrip coordinates) intersects
+ // the window caption area of the browser window.
+ bool IsRectInWindowCaption(const gfx::Rect& rect);
+
// Set the background offset used by inactive tabs to match the frame image.
void SetBackgroundOffset(const gfx::Point& offset);
@@ -221,8 +225,7 @@ class TabStrip : public views::View,
virtual void OnDragExited() OVERRIDE;
virtual int OnPerformDrop(const ui::DropTargetEvent& event) OVERRIDE;
virtual void GetAccessibleState(ui::AccessibleViewState* state) OVERRIDE;
- virtual views::View* GetEventHandlerForPoint(
- const gfx::Point& point) OVERRIDE;
+ virtual views::View* GetEventHandlerForRect(const gfx::Rect& rect) OVERRIDE;
virtual views::View* GetTooltipHandlerForPoint(
const gfx::Point& point) OVERRIDE;
@@ -494,6 +497,10 @@ class TabStrip : public views::View,
// hit-test region of the specified Tab.
bool IsPointInTab(Tab* tab, const gfx::Point& point_in_tabstrip_coords);
+ // Returns true if the specified rect in TabStrip coords intersects the
+ // hit-test region of the specified Tab.
+ bool IsRectInTab(Tab* tab, const gfx::Rect& rect_in_tabstrip_coords);
+
// -- Touch Layout ----------------------------------------------------------
// Returns the position normal tabs start at.

Powered by Google App Engine
This is Rietveld 408576698