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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.cc

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, 10 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/views/location_bar/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 68306ee50c42369df49153b446d6f17bc91582cd..450b885913d804d947a90f688a81f9833958d556 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/extensions/script_bubble_controller.h"
#include "chrome/browser/extensions/tab_helper.h"
#include "chrome/browser/favicon/favicon_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"
@@ -1235,7 +1236,7 @@ bool LocationBarView::SkipDefaultKeyEventProcessing(const ui::KeyEvent& event) {
return true;
}
- // Tab while showing Instant commits instant immediately.
+ // Tab while showing Instant commits Instant immediately.
// Return true so that focus traversal isn't attempted. The edit ends
// up doing nothing in this case.
if (location_entry_->model()->AcceptCurrentInstantPreview())
@@ -1274,9 +1275,8 @@ bool LocationBarView::HasFocus() const {
}
void LocationBarView::OnBoundsChanged(const gfx::Rect& previous_bounds) {
- if (browser_ && browser_->instant_controller() && parent()) {
- browser_->instant_controller()->SetOmniboxBounds(bounds());
- }
+ if (browser_ && browser_->instant_controller() && parent())
+ browser_->instant_controller()->instant()->SetOmniboxBounds(bounds());
}
void LocationBarView::WriteDragDataForView(views::View* sender,
@@ -1328,11 +1328,6 @@ void LocationBarView::ShowFirstRunBubble() {
ShowFirstRunBubbleInternal();
}
-void LocationBarView::SetInstantSuggestion(
- const InstantSuggestion& suggestion) {
- location_entry_->model()->SetInstantSuggestion(suggestion);
-}
-
string16 LocationBarView::GetInputString() const {
return location_input_;
}

Powered by Google App Engine
This is Rietveld 408576698