summaryrefslogtreecommitdiffstats
path: root/chrome/browser/tab_contents
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 16:27:34 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-18 16:27:34 +0000
commitcceef99cfabebbafb13371fc6a47dd1c875fc8b1 (patch)
tree0d5688231d4110a85ecf0cd8a4332adfacb996a7 /chrome/browser/tab_contents
parent3458a5c8320d3db39b6fbb88ee31cea4d551ca20 (diff)
downloadchromium_src-cceef99cfabebbafb13371fc6a47dd1c875fc8b1.zip
chromium_src-cceef99cfabebbafb13371fc6a47dd1c875fc8b1.tar.gz
chromium_src-cceef99cfabebbafb13371fc6a47dd1c875fc8b1.tar.bz2
Linux: Fix interstitials to work across tab changes.
BUG=http://www.crbug.com/8486 TEST=Bring up two tabs. In one tab, navigate to https://ianfette.org. Switch to the next tab. Switch back to the first tab. It should still display the interstitial page. Try this both with the focus on the interstitial page before you switch to the second tab and with the focus on the omnibox before switching tabs, to make sure focus is set properly. Review URL: http://codereview.chromium.org/115446 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@16282 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r--chrome/browser/tab_contents/tab_contents_view_gtk.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/chrome/browser/tab_contents/tab_contents_view_gtk.cc b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
index 0449847..1ccc202 100644
--- a/chrome/browser/tab_contents/tab_contents_view_gtk.cc
+++ b/chrome/browser/tab_contents/tab_contents_view_gtk.cc
@@ -17,6 +17,7 @@
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_view_host_factory.h"
#include "chrome/browser/renderer_host/render_widget_host_view_gtk.h"
+#include "chrome/browser/tab_contents/interstitial_page.h"
#include "chrome/browser/tab_contents/render_view_context_menu_gtk.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/tab_contents/tab_contents_delegate.h"
@@ -200,9 +201,13 @@ bool TabContentsViewGtk::GetFindBarWindowInfo(gfx::Point* position,
}
void TabContentsViewGtk::Focus() {
- GtkWidget* widget = GetContentNativeView();
- if (widget)
- gtk_widget_grab_focus(widget);
+ if (tab_contents()->showing_interstitial_page()) {
+ tab_contents()->interstitial_page()->Focus();
+ } else {
+ GtkWidget* widget = GetContentNativeView();
+ if (widget)
+ gtk_widget_grab_focus(widget);
+ }
}
void TabContentsViewGtk::SetInitialFocus() {