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

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

Issue 5701008: Fixes bug in instant that resulted in flickery fade. The problem would (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/chrome
Patch Set: Adds content to 403.html as bots seem to have problem with empty file 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 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after
3373 void Browser::PrepareForInstant() { 3373 void Browser::PrepareForInstant() {
3374 window_->PrepareForInstant(); 3374 window_->PrepareForInstant();
3375 } 3375 }
3376 3376
3377 void Browser::ShowInstant(TabContentsWrapper* preview_contents) { 3377 void Browser::ShowInstant(TabContentsWrapper* preview_contents) {
3378 DCHECK(instant_->tab_contents() == GetSelectedTabContentsWrapper()); 3378 DCHECK(instant_->tab_contents() == GetSelectedTabContentsWrapper());
3379 window_->ShowInstant(preview_contents->tab_contents()); 3379 window_->ShowInstant(preview_contents->tab_contents());
3380 } 3380 }
3381 3381
3382 void Browser::HideInstant() { 3382 void Browser::HideInstant() {
3383 window_->HideInstant(); 3383 window_->HideInstant(instant_->is_active());
3384 } 3384 }
3385 3385
3386 void Browser::CommitInstant(TabContentsWrapper* preview_contents) { 3386 void Browser::CommitInstant(TabContentsWrapper* preview_contents) {
3387 TabContentsWrapper* tab_contents = instant_->tab_contents(); 3387 TabContentsWrapper* tab_contents = instant_->tab_contents();
3388 int index = 3388 int index =
3389 tab_handler_->GetTabStripModel()->GetIndexOfTabContents(tab_contents); 3389 tab_handler_->GetTabStripModel()->GetIndexOfTabContents(tab_contents);
3390 DCHECK_NE(TabStripModel::kNoTab, index); 3390 DCHECK_NE(TabStripModel::kNoTab, index);
3391 preview_contents->controller().CopyStateFromAndPrune( 3391 preview_contents->controller().CopyStateFromAndPrune(
3392 &tab_contents->controller()); 3392 &tab_contents->controller());
3393 // TabStripModel takes ownership of preview_contents. 3393 // TabStripModel takes ownership of preview_contents.
(...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
4159 return false; 4159 return false;
4160 } 4160 }
4161 4161
4162 void Browser::CreateInstantIfNecessary() { 4162 void Browser::CreateInstantIfNecessary() {
4163 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) && 4163 if (type() == TYPE_NORMAL && InstantController::IsEnabled(profile()) &&
4164 !profile()->IsOffTheRecord()) { 4164 !profile()->IsOffTheRecord()) {
4165 instant_.reset(new InstantController(profile_, this)); 4165 instant_.reset(new InstantController(profile_, this));
4166 instant_unload_handler_.reset(new InstantUnloadHandler(this)); 4166 instant_unload_handler_.reset(new InstantUnloadHandler(this));
4167 } 4167 }
4168 } 4168 }
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