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

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

Issue 5697003: Fixes bug in instant where we wouldn't initially tell the page the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update test for new API 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_browsertest.cc ('k') | chrome/browser/instant/instant_loader.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 "build/build_config.h" 7 #include "build/build_config.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 NotificationService::current()->Notify( 182 NotificationService::current()->Notify(
183 NotificationType::INSTANT_CONTROLLER_UPDATED, 183 NotificationType::INSTANT_CONTROLLER_UPDATED,
184 Source<InstantController>(this), 184 Source<InstantController>(this),
185 NotificationService::NoDetails()); 185 NotificationService::NoDetails());
186 } 186 }
187 187
188 void InstantController::SetOmniboxBounds(const gfx::Rect& bounds) { 188 void InstantController::SetOmniboxBounds(const gfx::Rect& bounds) {
189 if (omnibox_bounds_ == bounds) 189 if (omnibox_bounds_ == bounds)
190 return; 190 return;
191 191
192 // Always track the omnibox bounds. That way if Update is later invoked the
193 // bounds are in sync.
194 omnibox_bounds_ = bounds;
192 if (loader_manager_.get()) { 195 if (loader_manager_.get()) {
193 omnibox_bounds_ = bounds;
194 if (loader_manager_->current_loader()) 196 if (loader_manager_->current_loader())
195 loader_manager_->current_loader()->SetOmniboxBounds(bounds); 197 loader_manager_->current_loader()->SetOmniboxBounds(bounds);
196 if (loader_manager_->pending_loader()) 198 if (loader_manager_->pending_loader())
197 loader_manager_->pending_loader()->SetOmniboxBounds(bounds); 199 loader_manager_->pending_loader()->SetOmniboxBounds(bounds);
198 } 200 }
199 } 201 }
200 202
201 void InstantController::DestroyPreviewContents() { 203 void InstantController::DestroyPreviewContents() {
202 if (!loader_manager_.get()) { 204 if (!loader_manager_.get()) {
203 // We're not showing anything, nothing to do. 205 // We're not showing anything, nothing to do.
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 return "Predictive"; 606 return "Predictive";
605 case VERBATIM_TYPE: 607 case VERBATIM_TYPE:
606 return "Verbatim"; 608 return "Verbatim";
607 case PREDICTIVE_NO_AUTO_COMPLETE_TYPE: 609 case PREDICTIVE_NO_AUTO_COMPLETE_TYPE:
608 return "PredictiveNoAutoComplete"; 610 return "PredictiveNoAutoComplete";
609 default: 611 default:
610 NOTREACHED(); 612 NOTREACHED();
611 return std::string(); 613 return std::string();
612 } 614 }
613 } 615 }
OLDNEW
« no previous file with comments | « chrome/browser/instant/instant_browsertest.cc ('k') | chrome/browser/instant/instant_loader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698