summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views
diff options
context:
space:
mode:
authorjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 20:46:52 +0000
committerjohnnyg@chromium.org <johnnyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-14 20:46:52 +0000
commit4245ae4e0766915f2e5ef8f1ba411089bc261ba2 (patch)
tree5b103ce72ad7a5bc03ff742e91a057efd8bd84e7 /chrome/browser/views
parentd49099c62c66e972dd4dee81aa0d7eb47096dc1c (diff)
downloadchromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.zip
chromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.tar.gz
chromium_src-4245ae4e0766915f2e5ef8f1ba411089bc261ba2.tar.bz2
Notification balloons don't want the WS_EX_LAYOUTRTL style flag, since the directionality of the content is specified already inside the HTML.
BUG=46170 TEST=create a notification while using an RTL language for Chrome UI. Review URL: http://codereview.chromium.org/2794001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49723 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
-rw-r--r--chrome/browser/views/extensions/extension_popup.cc3
-rw-r--r--chrome/browser/views/notifications/balloon_view.cc10
-rw-r--r--chrome/browser/views/status_bubble_views.cc3
-rw-r--r--chrome/browser/views/theme_install_bubble_view.cc3
4 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/views/extensions/extension_popup.cc b/chrome/browser/views/extensions/extension_popup.cc
index f2a8f4d..95ac21e 100644
--- a/chrome/browser/views/extensions/extension_popup.cc
+++ b/chrome/browser/views/extensions/extension_popup.cc
@@ -109,7 +109,8 @@ ExtensionPopup::ExtensionPopup(ExtensionHost* host,
#else
border_widget_ = Widget::CreatePopupWidget(Widget::Transparent,
Widget::NotAcceptEvents,
- Widget::DeleteOnDestroy);
+ Widget::DeleteOnDestroy,
+ Widget::MirrorOriginInRTL);
#endif
border_widget_->Init(native_window, bounds());
#if defined(OS_CHROMEOS)
diff --git a/chrome/browser/views/notifications/balloon_view.cc b/chrome/browser/views/notifications/balloon_view.cc
index c1bea26..2c362d0 100644
--- a/chrome/browser/views/notifications/balloon_view.cc
+++ b/chrome/browser/views/notifications/balloon_view.cc
@@ -296,13 +296,16 @@ void BalloonViewImpl::Show(Balloon* balloon) {
//
// We carefully keep these two windows in sync to present the illusion of
// one window to the user.
+ //
+ // We don't let the OS manage the RTL layout of these widgets, because
+ // this code is already taking care of correctly reversing the layout.
gfx::Rect contents_rect = GetContentsRectangle();
html_contents_.reset(new BalloonViewHost(balloon));
html_contents_->SetPreferredSize(gfx::Size(10000, 10000));
-
html_container_ = Widget::CreatePopupWidget(Widget::NotTransparent,
Widget::AcceptEvents,
- Widget::DeleteOnDestroy);
+ Widget::DeleteOnDestroy,
+ Widget::DontMirrorOriginInRTL);
html_container_->SetAlwaysOnTop(true);
html_container_->Init(NULL, contents_rect);
html_container_->SetContentsView(html_contents_->view());
@@ -310,7 +313,8 @@ void BalloonViewImpl::Show(Balloon* balloon) {
gfx::Rect balloon_rect(x(), y(), GetTotalWidth(), GetTotalHeight());
frame_container_ = Widget::CreatePopupWidget(Widget::Transparent,
Widget::AcceptEvents,
- Widget::DeleteOnDestroy);
+ Widget::DeleteOnDestroy,
+ Widget::DontMirrorOriginInRTL);
frame_container_->SetWidgetDelegate(this);
frame_container_->SetAlwaysOnTop(true);
frame_container_->Init(NULL, balloon_rect);
diff --git a/chrome/browser/views/status_bubble_views.cc b/chrome/browser/views/status_bubble_views.cc
index 292d6ea..5026c49 100644
--- a/chrome/browser/views/status_bubble_views.cc
+++ b/chrome/browser/views/status_bubble_views.cc
@@ -557,7 +557,8 @@ void StatusBubbleViews::Init() {
if (!popup_.get()) {
popup_.reset(Widget::CreatePopupWidget(Widget::Transparent,
Widget::NotAcceptEvents,
- Widget::NotDeleteOnDestroy));
+ Widget::NotDeleteOnDestroy,
+ Widget::MirrorOriginInRTL));
if (!view_)
view_ = new StatusView(this, popup_.get(), frame_->GetThemeProvider());
if (!expand_view_.get())
diff --git a/chrome/browser/views/theme_install_bubble_view.cc b/chrome/browser/views/theme_install_bubble_view.cc
index a03b8b5..43871b1 100644
--- a/chrome/browser/views/theme_install_bubble_view.cc
+++ b/chrome/browser/views/theme_install_bubble_view.cc
@@ -70,7 +70,8 @@ ThemeInstallBubbleView::ThemeInstallBubbleView(TabContents* tab_contents)
gfx::Rect rc(0, 0, 0, 0);
popup_ = views::Widget::CreatePopupWidget(views::Widget::Transparent,
views::Widget::NotAcceptEvents,
- views::Widget::DeleteOnDestroy);
+ views::Widget::DeleteOnDestroy,
+ views::Widget::MirrorOriginInRTL);
popup_->SetOpacity(0xCC);
popup_->Init(tab_contents->GetNativeView(), rc);
popup_->SetContentsView(this);