| OLD | NEW |
| (Empty) |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "chrome/browser/ui/gtk/instant_preview_controller_gtk.h" | |
| 6 | |
| 7 #include "chrome/browser/instant/instant_model.h" | |
| 8 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | |
| 9 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | |
| 10 | |
| 11 InstantPreviewControllerGtk::InstantPreviewControllerGtk( | |
| 12 BrowserWindowGtk* window, | |
| 13 TabContentsContainerGtk* contents) | |
| 14 : InstantPreviewController(window->browser()), | |
| 15 window_(window), | |
| 16 contents_(contents) { | |
| 17 } | |
| 18 | |
| 19 InstantPreviewControllerGtk::~InstantPreviewControllerGtk() { | |
| 20 } | |
| 21 | |
| 22 void InstantPreviewControllerGtk::PreviewStateChanged( | |
| 23 const InstantModel& model) { | |
| 24 if (model.mode().is_search_suggestions()) { | |
| 25 // TODO(jered): Support non-100% height. | |
| 26 contents_->SetPreview(model.GetPreviewContents()); | |
| 27 } else { | |
| 28 contents_->SetPreview(NULL); | |
| 29 } | |
| 30 window_->MaybeShowBookmarkBar(false); | |
| 31 } | |
| OLD | NEW |