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

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

Issue 11262015: Remove unused / unnecessary stuff from Instant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove SuggestedTextView entirely Created 8 years, 2 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 2c65cdd106636281f95e676ceb98f8c9b4f8bb5f..f2b04b9ea77b3335e07848675cc66301c5770e33 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -47,7 +47,6 @@
#include "chrome/browser/ui/views/location_bar/page_action_with_badge_view.h"
#include "chrome/browser/ui/views/location_bar/selected_keyword_view.h"
#include "chrome/browser/ui/views/location_bar/star_view.h"
-#include "chrome/browser/ui/views/location_bar/suggested_text_view.h"
#include "chrome/browser/ui/views/location_bar/web_intents_button_view.h"
#include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
#include "chrome/browser/ui/views/location_bar/zoom_view.h"
@@ -616,21 +615,22 @@ gfx::Point LocationBarView::GetLocationEntryOrigin() const {
return origin;
}
-void LocationBarView::SetInstantSuggestion(const string16& text,
- bool animate_to_complete) {
+void LocationBarView::SetInstantSuggestion(const string16& text) {
// Don't show the suggested text if inline autocomplete is prevented.
if (!text.empty()) {
if (!suggested_text_view_) {
- suggested_text_view_ = new SuggestedTextView(
- location_entry_->model(), instant_extended_api_enabled_);
+ suggested_text_view_ = new views::Label();
+ suggested_text_view_->SetHorizontalAlignment(views::Label::ALIGN_LEFT);
+ suggested_text_view_->SetAutoColorReadabilityEnabled(false);
+ suggested_text_view_->SetEnabledColor(LocationBarView::GetColor(
+ instant_extended_api_enabled_, ToolbarModel::NONE,
+ LocationBarView::DEEMPHASIZED_TEXT));
suggested_text_view_->SetText(text);
suggested_text_view_->SetFont(location_entry_->GetFont());
AddChildView(suggested_text_view_);
} else if (suggested_text_view_->text() != text) {
suggested_text_view_->SetText(text);
}
- if (animate_to_complete && !location_entry_->IsImeComposing())
- suggested_text_view_->StartAnimation();
} else if (suggested_text_view_) {
delete suggested_text_view_;
suggested_text_view_ = NULL;
@@ -1155,8 +1155,6 @@ void LocationBarView::OnChanged() {
}
void LocationBarView::OnSelectionBoundsChanged() {
- if (suggested_text_view_)
- suggested_text_view_->StopAnimation();
}
void LocationBarView::OnInputInProgress(bool in_progress) {
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.h ('k') | chrome/browser/ui/views/location_bar/suggested_text_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698