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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 5997004: Merge 69201 - Fixes bug in instant that resulted in flickery fade. The proble... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: '' Created 10 years 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/instant/instant_delegate.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shellapi.h> 8 #include <shellapi.h>
9 #include <windows.h> 9 #include <windows.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 3358 matching lines...) Expand 10 before | Expand all | Expand 10 after
3369 void Browser::PrepareForInstant() { 3369 void Browser::PrepareForInstant() {
3370 window_->PrepareForInstant(); 3370 window_->PrepareForInstant();
3371 } 3371 }
3372 3372
3373 void Browser::ShowInstant(TabContentsWrapper* preview_contents) { 3373 void Browser::ShowInstant(TabContentsWrapper* preview_contents) {
3374 DCHECK(instant_->tab_contents() == GetSelectedTabContentsWrapper()); 3374 DCHECK(instant_->tab_contents() == GetSelectedTabContentsWrapper());
3375 window_->ShowInstant(preview_contents->tab_contents()); 3375 window_->ShowInstant(preview_contents->tab_contents());
3376 } 3376 }
3377 3377
3378 void Browser::HideInstant() { 3378 void Browser::HideInstant() {
3379 window_->HideInstant(); 3379 window_->HideInstant(instant_->is_active());
3380 } 3380 }
3381 3381
3382 void Browser::CommitInstant(TabContentsWrapper* preview_contents) { 3382 void Browser::CommitInstant(TabContentsWrapper* preview_contents) {
3383 TabContentsWrapper* tab_contents = instant_->tab_contents(); 3383 TabContentsWrapper* tab_contents = instant_->tab_contents();
3384 int index = 3384 int index =
3385 tab_handler_->GetTabStripModel()->GetIndexOfTabContents(tab_contents); 3385 tab_handler_->GetTabStripModel()->GetIndexOfTabContents(tab_contents);
3386 DCHECK_NE(TabStripModel::kNoTab, index); 3386 DCHECK_NE(TabStripModel::kNoTab, index);
3387 preview_contents->controller().CopyStateFromAndPrune( 3387 preview_contents->controller().CopyStateFromAndPrune(
3388 &tab_contents->controller()); 3388 &tab_contents->controller());
3389 // TabStripModel takes ownership of preview_contents. 3389 // TabStripModel takes ownership of preview_contents.
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after
4154 return false; 4154 return false;
4155 } 4155 }
4156 4156
4157 void Browser::CreateInstantIfNecessary() { 4157 void Browser::CreateInstantIfNecessary() {
4158 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) && 4158 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) &&
4159 !profile()->IsOffTheRecord()) { 4159 !profile()->IsOffTheRecord()) {
4160 instant_.reset(new InstantController(profile_, this)); 4160 instant_.reset(new InstantController(profile_, this));
4161 instant_unload_handler_.reset(new InstantUnloadHandler(this)); 4161 instant_unload_handler_.reset(new InstantUnloadHandler(this));
4162 } 4162 }
4163 } 4163 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_delegate.h ('k') | chrome/browser/ui/browser_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698