diff options
author | zelidrag@google.com <zelidrag@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 21:49:44 +0000 |
---|---|---|
committer | zelidrag@google.com <zelidrag@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 21:49:44 +0000 |
commit | fa1cf0b87092ed3f3069a8549270f999e05cca20 (patch) | |
tree | 71c08950f340004c1107776d0d4962d8b38bfb8e /chrome/browser/gtk/constrained_window_gtk.cc | |
parent | 18db63ea67ad2f5e428022e32ff55de83c0db0ca (diff) | |
download | chromium_src-fa1cf0b87092ed3f3069a8549270f999e05cca20.zip chromium_src-fa1cf0b87092ed3f3069a8549270f999e05cca20.tar.gz chromium_src-fa1cf0b87092ed3f3069a8549270f999e05cca20.tar.bz2 |
Tab-modal dialog improvements:
- treat constrained dialogs as tab-modal - only one shows at the time
- added visual indication (tab pulsing) to the tab strip when a tab is blocked by a tab-modal dialog
- blocked all UI activity from rendrer host and forced refocusing on constrained (tab-modal) dialogs
This CL reverts http://codereview.chromium.org/384113 and instead incorporates the changes from http://codereview.chromium.org/392018.
BUG=456,27585,27620
TEST=Go to http://www/~thakis/cgi-bin/test.html, hit esc.
Review URL: http://codereview.chromium.org/541056
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/constrained_window_gtk.cc')
-rw-r--r-- | chrome/browser/gtk/constrained_window_gtk.cc | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/chrome/browser/gtk/constrained_window_gtk.cc b/chrome/browser/gtk/constrained_window_gtk.cc index 1f53a59..c6380d6 100644 --- a/chrome/browser/gtk/constrained_window_gtk.cc +++ b/chrome/browser/gtk/constrained_window_gtk.cc @@ -11,7 +11,8 @@ ConstrainedWindowGtk::ConstrainedWindowGtk( TabContents* owner, ConstrainedWindowGtkDelegate* delegate) : owner_(owner), - delegate_(delegate) { + delegate_(delegate), + visible_(false) { DCHECK(owner); DCHECK(delegate); GtkWidget* dialog = delegate->GetWidgetRoot(); @@ -29,20 +30,25 @@ ConstrainedWindowGtk::ConstrainedWindowGtk( gtk_container_add(GTK_CONTAINER(frame), alignment); gtk_container_add(GTK_CONTAINER(ebox), frame); border_.Own(ebox); +} + +ConstrainedWindowGtk::~ConstrainedWindowGtk() { + border_.Destroy(); +} +void ConstrainedWindowGtk::ShowConstrainedWindow() { gtk_widget_show_all(border_.get()); // We collaborate with TabContentsViewGtk and stick ourselves in the // TabContentsViewGtk's floating container. ContainingView()->AttachConstrainedWindow(this); -} -ConstrainedWindowGtk::~ConstrainedWindowGtk() { - border_.Destroy(); + visible_ = true; } void ConstrainedWindowGtk::CloseConstrainedWindow() { - ContainingView()->RemoveConstrainedWindow(this); + if (visible_) + ContainingView()->RemoveConstrainedWindow(this); delegate_->DeleteDelegate(); owner_->WillClose(this); |