summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions/extension_view.cc
diff options
context:
space:
mode:
authorerikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-11 21:18:12 +0000
committererikkay@google.com <erikkay@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-11 21:18:12 +0000
commitf13b7ec28d366eb0959604fc7eccf2be634d0864 (patch)
treec4234df59df2bd6cf1fb076d6713b563dbd5a4e4 /chrome/browser/extensions/extension_view.cc
parentba02479cfff23a041e352286aadf92561a952c64 (diff)
downloadchromium_src-f13b7ec28d366eb0959604fc7eccf2be634d0864.zip
chromium_src-f13b7ec28d366eb0959604fc7eccf2be634d0864.tar.gz
chromium_src-f13b7ec28d366eb0959604fc7eccf2be634d0864.tar.bz2
Fix a bug where the extension toolstrip could get reparented to the desktop.
BUG=11743 TEST=follow the steps described in the bug Review URL: http://codereview.chromium.org/113204 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15781 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions/extension_view.cc')
-rwxr-xr-xchrome/browser/extensions/extension_view.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/chrome/browser/extensions/extension_view.cc b/chrome/browser/extensions/extension_view.cc
index 9975a8c..38028d7 100755
--- a/chrome/browser/extensions/extension_view.cc
+++ b/chrome/browser/extensions/extension_view.cc
@@ -25,16 +25,18 @@ ExtensionView::~ExtensionView() {
}
void ExtensionView::SetVisible(bool is_visible) {
- HWNDView::SetVisible(is_visible);
+ if (is_visible != IsVisible()) {
+ HWNDView::SetVisible(is_visible);
- // Also tell RenderWidgetHostView the new visibility. Despite its name, it is
- // not part of the View heirarchy and does not know about the change unless we
- // tell it.
- if (render_view_host()->view()) {
- if (is_visible)
- render_view_host()->view()->Show();
- else
- render_view_host()->view()->Hide();
+ // Also tell RenderWidgetHostView the new visibility. Despite its name, it
+ // is not part of the View heirarchy and does not know about the change
+ // unless we tell it.
+ if (render_view_host()->view()) {
+ if (is_visible)
+ render_view_host()->view()->Show();
+ else
+ render_view_host()->view()->Hide();
+ }
}
}