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

Unified Diff: chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm

Issue 12386019: Instant: Use only one hidden WebContents per profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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/cocoa/location_bar/location_bar_view_mac.mm
diff --git a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
index f653b4f053608edc053345012dcdfcc1d04fb786..dc3ebcead1fe3749e7a4e561e79b67ee648e6a2d 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_bar_view_mac.mm
@@ -21,6 +21,7 @@
#include "chrome/browser/extensions/extension_action.h"
#include "chrome/browser/extensions/location_bar_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
+#include "chrome/browser/instant/instant_controller.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url.h"
#include "chrome/browser/search_engines/template_url_service.h"
@@ -174,11 +175,6 @@ string16 LocationBarViewMac::GetInputString() const {
return location_input_;
}
-void LocationBarViewMac::SetInstantSuggestion(
- const InstantSuggestion& suggestion) {
- omnibox_view_->model()->SetInstantSuggestion(suggestion);
-}
-
WindowOpenDisposition LocationBarViewMac::GetWindowOpenDisposition() const {
return disposition_;
}
@@ -300,10 +296,8 @@ void LocationBarViewMac::OnChanged() {
ev_bubble_decoration_->SetImage(image);
Layout();
- if (browser_->instant_controller()) {
- browser_->instant_controller()->SetOmniboxBounds(
- gfx::Rect(NSRectToCGRect([field_ frame])));
- }
+ if (GetInstant())
+ GetInstant()->SetOmniboxBounds(gfx::Rect(NSRectToCGRect([field_ frame])));
}
void LocationBarViewMac::OnSelectionBoundsChanged() {

Powered by Google App Engine
This is Rietveld 408576698