Index: chrome/browser/ui/browser_instant_controller.cc |
diff --git a/chrome/browser/ui/browser_instant_controller.cc b/chrome/browser/ui/browser_instant_controller.cc |
index dc58960c5b0c7f73a66a246cab065c3086828af6..293d9f51325d7e0fbae15bb8dfb9ab3427a26ab1 100644 |
--- a/chrome/browser/ui/browser_instant_controller.cc |
+++ b/chrome/browser/ui/browser_instant_controller.cc |
@@ -78,6 +78,7 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition) { |
void BrowserInstantController::ShowInstant() { |
TabContents* preview = instant_->GetPreviewContents(); |
+ preview->web_contents()->WasShown(); |
sky
2012/08/20 16:29:31
Any reason you're not putting this in InstantContr
sreeram_google.com
2012/08/20 16:36:45
No particular reason. Historically, this code has
sreeram
2012/08/20 16:46:25
I forgot to add that, since the Browser operates o
|
browser_->window()->ShowInstant(preview); |
content::NotificationService::current()->Notify( |
@@ -88,10 +89,12 @@ void BrowserInstantController::ShowInstant() { |
// TODO(beng): Investigate if we can avoid this and instead rely on the |
// visibility of the WebContentsView. |
chrome::GetActiveWebContents(browser_)->WasHidden(); |
- preview->web_contents()->WasShown(); |
} |
void BrowserInstantController::HideInstant() { |
+ if (chrome::GetActiveWebContents(browser_)) |
+ chrome::GetActiveWebContents(browser_)->WasShown(); |
sky
2012/08/20 16:29:31
How come you're moving this?
sreeram_google.com
2012/08/20 16:36:45
Same reason as before. When we call browser_->wind
|
+ |
browser_->window()->HideInstant(); |
content::NotificationService::current()->Notify( |
@@ -99,8 +102,6 @@ void BrowserInstantController::HideInstant() { |
content::Source<InstantController>(instant()), |
content::NotificationService::NoDetails()); |
- if (chrome::GetActiveWebContents(browser_)) |
- chrome::GetActiveWebContents(browser_)->WasShown(); |
if (TabContents* preview = instant_->GetPreviewContents()) |
preview->web_contents()->WasHidden(); |
} |