summaryrefslogtreecommitdiffstats
path: root/views/controls/resize_gripper.h
diff options
context:
space:
mode:
authorfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 04:55:57 +0000
committerfinnur@chromium.org <finnur@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-27 04:55:57 +0000
commite578e76354f5838edb54dc1d9457561030002123 (patch)
treec13ba5657921756bed0a167aa56edbec68730823 /views/controls/resize_gripper.h
parent7d767625372cad11adca0789531753bd56e40e0e (diff)
downloadchromium_src-e578e76354f5838edb54dc1d9457561030002123.zip
chromium_src-e578e76354f5838edb54dc1d9457561030002123.tar.gz
chromium_src-e578e76354f5838edb54dc1d9457561030002123.tar.bz2
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
Diffstat (limited to 'views/controls/resize_gripper.h')
-rw-r--r--views/controls/resize_gripper.h10
1 files changed, 8 insertions, 2 deletions
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_;