diff options
author | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 05:34:38 +0000 |
---|---|---|
committer | xji@chromium.org <xji@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-25 05:34:38 +0000 |
commit | f8d13fab476e5018fee5794e63bb64d6dee99bba (patch) | |
tree | d567bc02c1be91ec9d01b98082e1e16371edc76e /chrome/browser/views/download_item_view.h | |
parent | e8361d4264211c6b47e0ae87606ea56c42da9952 (diff) | |
download | chromium_src-f8d13fab476e5018fee5794e63bb64d6dee99bba.zip chromium_src-f8d13fab476e5018fee5794e63bb64d6dee99bba.tar.gz chromium_src-f8d13fab476e5018fee5794e63bb64d6dee99bba.tar.bz2 |
This CL fixes issue 14481 - RTL: Chrome is trying to open exe file directly after clicking down arrow on download shelf instead of drawing a context menu
After changing the download items in download shelf to be RTL in RTL UI, need to change the computation of x coordinate of drop down button.
BUG=http://crbug.com/14481
TEST=
1. Run Hebrew Chrome
2. Download an exe file
>> Dangerous file warning should show up now
3. Click "Save" button
4. Click the down arrow on the download shelf
5. Chrome should draw a context menu after clicking down arrow (not trying to open the exe file)
Review URL: http://codereview.chromium.org/131091
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19232 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/download_item_view.h')
-rw-r--r-- | chrome/browser/views/download_item_view.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/browser/views/download_item_view.h b/chrome/browser/views/download_item_view.h index 1332e1b..e3fd235 100644 --- a/chrome/browser/views/download_item_view.h +++ b/chrome/browser/views/download_item_view.h @@ -142,6 +142,10 @@ class DownloadItemView : public views::ButtonListener, // open the downloaded file. void Reenable(); + // Given |x|, returns whether |x| is within the x coordinate range of + // the drop-down button or not. + bool InDropDownButtonXCoordinateRange(int x); + // The different images used for the background. BodyImageSet normal_body_image_set_; BodyImageSet hot_body_image_set_; @@ -174,8 +178,9 @@ class DownloadItemView : public views::ButtonListener, // In degrees, for downloads with no known total size. int progress_angle_; - // The x coordinate at which the drop-down button starts. - int drop_down_x_; + // The left and right x coordinates of the drop-down button. + int drop_down_x_left_; + int drop_down_x_right_; // Used when we are showing the menu to show the drop-down as pressed. bool drop_down_pressed_; |