Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: chrome/browser/ui/browser_instant_controller.cc

Issue 10915217: Hook up SetInstantPreviewHeight for ChromeOS. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move hidden notification, too. Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 461179ed9bdea199a25f349fa92805618b747489..fd0c9b9b24cee09f1256d13c592bd63abcb74edf 100644
--- a/chrome/browser/ui/browser_instant_controller.cc
+++ b/chrome/browser/ui/browser_instant_controller.cc
@@ -77,21 +77,16 @@ bool BrowserInstantController::OpenInstant(WindowOpenDisposition disposition) {
////////////////////////////////////////////////////////////////////////////////
// BrowserInstantController, InstantControllerDelegate implementation:
-void BrowserInstantController::ShowInstant() {
+void BrowserInstantController::ShowInstant(int height, InstantSizeUnits units) {
// Call ShowInstant() first, before WasShown(), so that the preview is added
// to the window hierarchy before it's painted. http://crbug.com/145568
TabContents* preview = instant_->GetPreviewContents();
- browser_->window()->ShowInstant(preview);
+ browser_->window()->ShowInstant(preview, height, units);
// TODO(beng): Investigate if we can avoid this and instead rely on the
// visibility of the WebContentsView.
preview->web_contents()->WasShown();
chrome::GetActiveWebContents(browser_)->WasHidden();
-
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_INSTANT_CONTROLLER_SHOWN,
- content::Source<InstantController>(instant()),
- content::NotificationService::NoDetails());
}
void BrowserInstantController::HideInstant() {
@@ -101,11 +96,6 @@ void BrowserInstantController::HideInstant() {
chrome::GetActiveWebContents(browser_)->WasShown();
if (TabContents* preview = instant_->GetPreviewContents())
preview->web_contents()->WasHidden();
-
- content::NotificationService::current()->Notify(
- chrome::NOTIFICATION_INSTANT_CONTROLLER_HIDDEN,
- content::Source<InstantController>(instant()),
- content::NotificationService::NoDetails());
}
void BrowserInstantController::CommitInstant(TabContents* preview) {
« no previous file with comments | « chrome/browser/ui/browser_instant_controller.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698