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

Side by Side Diff: chrome/browser/instant/instant_controller.cc

Issue 4932001: Makes the current page dim out when transitioning to instant preview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup Created 10 years, 1 month 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/gtk/browser_window_gtk.cc ('k') | chrome/browser/instant/instant_delegate.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/instant/instant_controller.h" 5 #include "chrome/browser/instant/instant_controller.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/autocomplete/autocomplete_match.h" 8 #include "chrome/browser/autocomplete/autocomplete_match.h"
9 #include "chrome/browser/instant/instant_delegate.h" 9 #include "chrome/browser/instant/instant_delegate.h"
10 #include "chrome/browser/instant/instant_loader.h" 10 #include "chrome/browser/instant/instant_loader.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 DestroyPreviewContents(); 86 DestroyPreviewContents();
87 return; 87 return;
88 } 88 }
89 89
90 const TemplateURL* template_url = GetTemplateURL(match); 90 const TemplateURL* template_url = GetTemplateURL(match);
91 TemplateURLID template_url_id = template_url ? template_url->id() : 0; 91 TemplateURLID template_url_id = template_url ? template_url->id() : 0;
92 92
93 if (!loader_manager_.get()) 93 if (!loader_manager_.get())
94 loader_manager_.reset(new InstantLoaderManager(this)); 94 loader_manager_.reset(new InstantLoaderManager(this));
95 95
96 if (!is_active_)
97 delegate_->PrepareForInstant();
98
96 if (ShouldUpdateNow(template_url_id, match.destination_url)) { 99 if (ShouldUpdateNow(template_url_id, match.destination_url)) {
97 UpdateLoader(template_url, match.destination_url, match.transition, 100 UpdateLoader(template_url, match.destination_url, match.transition,
98 user_text, suggested_text); 101 user_text, suggested_text);
99 } else { 102 } else {
100 ScheduleUpdate(match.destination_url); 103 ScheduleUpdate(match.destination_url);
101 } 104 }
102 105
103 NotificationService::current()->Notify( 106 NotificationService::current()->Notify(
104 NotificationType::INSTANT_CONTROLLER_UPDATED, 107 NotificationType::INSTANT_CONTROLLER_UPDATED,
105 Source<InstantController>(this), 108 Source<InstantController>(this),
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 template_url = model ? model->GetDefaultSearchProvider() : NULL; 412 template_url = model ? model->GetDefaultSearchProvider() : NULL;
410 } 413 }
411 if (template_url && template_url->id() && 414 if (template_url && template_url->id() &&
412 template_url->instant_url() && 415 template_url->instant_url() &&
413 !IsBlacklistedFromInstant(template_url->id()) && 416 !IsBlacklistedFromInstant(template_url->id()) &&
414 template_url->instant_url()->SupportsReplacement()) { 417 template_url->instant_url()->SupportsReplacement()) {
415 return template_url; 418 return template_url;
416 } 419 }
417 return NULL; 420 return NULL;
418 } 421 }
OLDNEW
« no previous file with comments | « chrome/browser/gtk/browser_window_gtk.cc ('k') | chrome/browser/instant/instant_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698