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

Unified Diff: chrome/browser/ui/views/frame/browser_view.cc

Issue 11233076: Fix spurious visibility events when committing Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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
Index: chrome/browser/ui/views/frame/browser_view.cc
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index c358123243f1adef5128fe3d6103edac0c27bb33..c1aaffba41fd1ebaddee42a219ace4d4598deb30 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1380,6 +1380,17 @@ ToolbarView* BrowserView::GetToolbarView() const {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, TabStripModelObserver implementation:
+void BrowserView::TabInsertedAt(TabContents* contents, int index, bool active) {
sky 2012/10/24 03:51:16 Why can't we wait until ActiveTabChanged?
sreeram 2012/10/24 16:46:45 I suppose we could. However, I plan to add support
sky 2012/10/24 20:49:26 I don't like adding another method that overlaps w
sreeram 2012/10/25 00:44:33 Done. In fact, I realized that pretty much everyth
+ if (contents_->preview_web_contents() == contents->web_contents() && active) {
+#if defined(USE_AURA)
+ if (search_view_controller_.get())
+ search_view_controller_->WillCommitInstant();
+#endif
+ contents_container_ = preview_controller_->release_preview_container();
+ contents_->MakePreviewContentsActiveContents();
+ }
+}
+
void BrowserView::TabDetachedAt(TabContents* contents, int index) {
// We use index here rather than comparing |contents| because by this time
// the model has already removed |contents| from its list, so

Powered by Google App Engine
This is Rietveld 408576698