diff options
author | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:56:08 +0000 |
---|---|---|
committer | cira@chromium.org <cira@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-26 18:56:08 +0000 |
commit | 497d519174323375ed87eca55a5a28560c3c97f1 (patch) | |
tree | 0a2b9f2f94b50e1227095b80deebcaa978b9382c | |
parent | b4015eaaa7cad8c56fd29d5fc5e3b7e1e88cbbec (diff) | |
download | chromium_src-497d519174323375ed87eca55a5a28560c3c97f1.zip chromium_src-497d519174323375ed87eca55a5a28560c3c97f1.tar.gz chromium_src-497d519174323375ed87eca55a5a28560c3c97f1.tar.bz2 |
Change BrowserBubble so that clients can say if they expect canvas mirroring to happen or not.
ExtensionShelf doesn't need mirroring since View methods already provide most of the RTL functionality.
BUG=http://crbug.com/11880
TEST=Run chrome --lang=he and add 1+ extensions, and see if the handle is in proper position.
Review URL: http://codereview.chromium.org/149045
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19395 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/views/browser_bubble.cc | 9 | ||||
-rw-r--r-- | chrome/browser/views/browser_bubble.h | 1 |
2 files changed, 3 insertions, 7 deletions
diff --git a/chrome/browser/views/browser_bubble.cc b/chrome/browser/views/browser_bubble.cc index 4736ad3..15c45a6 100644 --- a/chrome/browser/views/browser_bubble.cc +++ b/chrome/browser/views/browser_bubble.cc @@ -72,13 +72,8 @@ void BrowserBubble::BrowserWindowClosed() { } void BrowserBubble::SetBounds(int x, int y, int w, int h) { - // If the UI layout is RTL, we need to mirror the position of the bubble - // relative to the parent. - if (l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT) { - gfx::Rect frame_bounds; - frame_->GetBounds(&frame_bounds, false); - x = frame_bounds.width() - x - w; - } + // If the UI layout is RTL, we don't need to mirror coordinates, since + // View logic will do that for us. bounds_.SetRect(x, y, w, h); Reposition(); } diff --git a/chrome/browser/views/browser_bubble.h b/chrome/browser/views/browser_bubble.h index 702fb1b..bc4f509 100644 --- a/chrome/browser/views/browser_bubble.h +++ b/chrome/browser/views/browser_bubble.h @@ -12,6 +12,7 @@ // Browser. If you don't install a delegate, the bubble will hide // automatically when the browser moves. The bubble is only shown manually. // Users are expected to delete the bubble when finished with it. +// Class assumes that RTL related mirroring is done by the view. class BrowserBubble { public: // Delegate to browser bubble events. |