From e578e76354f5838edb54dc1d9457561030002123 Mon Sep 17 00:00:00 2001 From: "finnur@chromium.org" Date: Wed, 27 Jan 2010 04:55:57 +0000 Subject: Add overflow menu to the browser action container (part 2 of supporting resize for the container). Also improved RTL support a bit (the divider wasn't drawn on the right side of the container and resizing was reversed). BUG=32101 TEST=Overflow menu for browser action container should now work. Make sure to test also right-clicking on a menu item in the overflow menu to bring up a context menu for that item. And resizing the container in RTL locales should work. Review URL: http://codereview.chromium.org/557006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@37232 0039d316-1c4b-4281-b951-d872f2087c98 --- views/controls/resize_gripper.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'views/controls/resize_gripper.h') diff --git a/views/controls/resize_gripper.h b/views/controls/resize_gripper.h index 1b65066..204aa9f 100644 --- a/views/controls/resize_gripper.h +++ b/views/controls/resize_gripper.h @@ -27,8 +27,10 @@ class ResizeGripper : public ImageView { public: // OnResize is sent when resizing is detected. |resize_amount| specifies the // number of pixels that the user wants to resize by, and can be negative or - // positive (depending on direction of dragging). |done_resizing| is - // true if the user has released the mouse. + // positive (depending on direction of dragging and flips according to + // locale directionality: dragging to the left in LTR locales gives negative + // |resize_amount| but positive amount for RTL). |done_resizing| is true if + // the user has released the mouse. virtual void OnResize(int resize_amount, bool done_resizing) = 0; }; @@ -46,6 +48,10 @@ class ResizeGripper : public ImageView { static const char kViewClassName[]; private: + // Report the amount the user resized by to the delegate, accounting for + // directionality. + void ReportResizeAmount(int resize_amount, bool last_update); + // The delegate to notify when we have updates. ResizeGripperDelegate* delegate_; -- cgit v1.1