Index: chrome/browser/instant/instant_loader.cc |
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc |
index d0a7d4a60fc44dddae797b928f73c459d5c00361..ee4cae01cf86ff15ae84391855e51c46fef9bde2 100644 |
--- a/chrome/browser/instant/instant_loader.cc |
+++ b/chrome/browser/instant/instant_loader.cc |
@@ -184,8 +184,6 @@ class InstantLoader::TabContentsDelegateImpl |
unsigned changed_flags) OVERRIDE; |
virtual void AddNavigationHeaders(const GURL& url, |
std::string* headers) OVERRIDE; |
- virtual bool ShouldFocusConstrainedWindow() OVERRIDE; |
- virtual void WillShowConstrainedWindow(TabContents* source) OVERRIDE; |
virtual bool ShouldSuppressDialogs() OVERRIDE; |
virtual void BeforeUnloadFired(TabContents* tab, |
bool proceed, |
@@ -208,6 +206,8 @@ class InstantLoader::TabContentsDelegateImpl |
// TabContentsWrapperDelegate: |
virtual void SwapTabContents(TabContentsWrapper* old_tc, |
TabContentsWrapper* new_tc) OVERRIDE; |
+ virtual void WillShowConstrainedWindow(TabContentsWrapper* source) OVERRIDE; |
+ virtual bool ShouldFocusConstrainedWindow() OVERRIDE; |
// TabContentsObserver: |
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
@@ -421,23 +421,6 @@ void InstantLoader::TabContentsDelegateImpl::AddNavigationHeaders( |
headers); |
} |
-bool InstantLoader::TabContentsDelegateImpl::ShouldFocusConstrainedWindow() { |
- // Return false so that constrained windows are not initially focused. If |
- // we did otherwise the preview would prematurely get committed when focus |
- // goes to the constrained window. |
- return false; |
-} |
- |
-void InstantLoader::TabContentsDelegateImpl::WillShowConstrainedWindow( |
- TabContents* source) { |
- if (!loader_->ready()) { |
- // A constrained window shown for an auth may not paint. Show the preview |
- // contents. |
- UnregisterForPaintNotifications(); |
- loader_->ShowPreview(); |
- } |
-} |
- |
bool InstantLoader::TabContentsDelegateImpl::ShouldSuppressDialogs() { |
// Any message shown during instant cancels instant, so we suppress them. |
return true; |
@@ -504,6 +487,22 @@ void InstantLoader::TabContentsDelegateImpl::SwapTabContents( |
loader_->ReplacePreviewContents(old_tc, new_tc); |
} |
+bool InstantLoader::TabContentsDelegateImpl::ShouldFocusConstrainedWindow() { |
+ // Return false so that constrained windows are not initially focused. If |
+ // we did otherwise the preview would prematurely get committed when focus |
+ // goes to the constrained window. |
+ return false; |
+} |
+ |
+void InstantLoader::TabContentsDelegateImpl::WillShowConstrainedWindow( |
+ TabContentsWrapper* source) { |
+ if (!loader_->ready()) { |
+ // A constrained window shown for an auth may not paint. Show the preview |
+ // contents. |
+ UnregisterForPaintNotifications(); |
+ loader_->ShowPreview(); |
+ } |
+} |
bool InstantLoader::TabContentsDelegateImpl::OnMessageReceived( |
const IPC::Message& message) { |