summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 22:52:21 +0000
committernduca@chromium.org <nduca@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-10 22:52:21 +0000
commitf5f2b838a077645b6ff97a995c98906e314304d5 (patch)
treea26687ba80fda3e47d75180d246823f850e8a7eb
parentcce9fdb3d4dc9d5d87bfa70c8e65aee0fe8f22af (diff)
downloadchromium_src-f5f2b838a077645b6ff97a995c98906e314304d5.zip
chromium_src-f5f2b838a077645b6ff97a995c98906e314304d5.tar.gz
chromium_src-f5f2b838a077645b6ff97a995c98906e314304d5.tar.bz2
Revert 109525 - Added support for SetInstantSuggestion
BUG=103672 TEST=Note that NOTIMPLEMENTEDs are gone Review URL: http://codereview.chromium.org/8523007 TBR=davemoore@chromium.org Review URL: http://codereview.chromium.org/8523018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109526 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.cc7
-rw-r--r--chrome/browser/ui/views/location_bar/location_bar_view.h8
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.cc10
-rw-r--r--chrome/browser/ui/views/omnibox/omnibox_view_views.h3
-rw-r--r--chrome/chrome_browser.gypi2
5 files changed, 12 insertions, 18 deletions
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 2141338..158738d 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -63,9 +63,6 @@
#if defined(OS_WIN)
#include "chrome/browser/ui/views/first_run_bubble.h"
-#endif
-
-#if defined(OS_WIN) || defined(USE_AURA)
#include "chrome/browser/ui/views/location_bar/suggested_text_view.h"
#endif
@@ -416,7 +413,7 @@ gfx::Point LocationBarView::GetLocationEntryOrigin() const {
return origin;
}
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
void LocationBarView::SetInstantSuggestion(const string16& text,
bool animate_to_complete) {
// Don't show the suggested text if inline autocomplete is prevented.
@@ -1241,7 +1238,7 @@ void LocationBarView::Observe(int type,
}
}
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
bool LocationBarView::HasValidSuggestText() const {
return suggested_text_view_ && !suggested_text_view_->size().IsEmpty() &&
!suggested_text_view_->GetText().empty();
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index 614563f..28ae57e 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -55,7 +55,7 @@ class HorizontalPainter;
class Label;
} // namespace views
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
class SuggestedTextView;
#endif
@@ -165,7 +165,7 @@ class LocationBarView : public LocationBar,
// appears, not where the icons are shown).
gfx::Point GetLocationEntryOrigin() const;
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
// Invoked from OmniboxViewWin to show the instant suggestion.
void SetInstantSuggestion(const string16& text,
bool animate_to_complete);
@@ -325,7 +325,7 @@ class LocationBarView : public LocationBar,
// Sets the visibility of view to new_vis.
void ToggleVisibility(bool new_vis, views::View* view);
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
#if !defined(USE_AURA)
// Helper for the Mouse event handlers that does all the real work.
void OnMouseEvent(const views::MouseEvent& event, UINT msg);
@@ -390,7 +390,7 @@ class LocationBarView : public LocationBar,
// Shown if the user has selected a keyword.
SelectedKeywordView* selected_keyword_view_;
-#if defined(OS_WIN) || defined(USE_AURA)
+#if defined(OS_WIN)
// View responsible for showing suggested text. This is NULL when there is no
// suggested text.
SuggestedTextView* suggested_text_view_;
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
index 1afbc07..f621264 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.cc
@@ -148,7 +148,7 @@ OmniboxViewViews::OmniboxViewViews(AutocompleteEditController* controller,
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
- LocationBarView* location_bar)
+ views::View* location_bar)
: model_(new AutocompleteEditModel(this, controller, profile)),
popup_view_(CreatePopupView(location_bar)),
controller_(controller),
@@ -157,8 +157,7 @@ OmniboxViewViews::OmniboxViewViews(AutocompleteEditController* controller,
popup_window_mode_(popup_window_mode),
security_level_(ToolbarModel::NONE),
ime_composing_before_change_(false),
- delete_at_end_pressed_(false),
- location_bar_view_(location_bar) {
+ delete_at_end_pressed_(false) {
set_border(views::Border::CreateEmptyBorder(kAutocompleteVerticalMargin, 0,
kAutocompleteVerticalMargin, 0));
}
@@ -563,11 +562,12 @@ CommandUpdater* OmniboxViewViews::GetCommandUpdater() {
void OmniboxViewViews::SetInstantSuggestion(const string16& input,
bool animate_to_complete) {
- location_bar_view_->SetInstantSuggestion(input, animate_to_complete);
+ NOTIMPLEMENTED();
}
string16 OmniboxViewViews::GetInstantSuggestion() const {
- return location_bar_view_->GetInstantSuggestion();
+ NOTIMPLEMENTED();
+ return string16();
}
int OmniboxViewViews::TextWidth() const {
diff --git a/chrome/browser/ui/views/omnibox/omnibox_view_views.h b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
index 5e51848..ec9f3e5 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_view_views.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_view_views.h
@@ -46,7 +46,7 @@ class OmniboxViewViews : public views::View,
Profile* profile,
CommandUpdater* command_updater,
bool popup_window_mode,
- LocationBarView* location_bar);
+ views::View* location_bar);
virtual ~OmniboxViewViews();
// Initialize, create the underlying views, etc;
@@ -185,7 +185,6 @@ class OmniboxViewViews : public views::View,
// Was the delete key pressed with an empty selection at the end of the edit?
bool delete_at_end_pressed_;
- LocationBarView* location_bar_view_;
DISALLOW_COPY_AND_ASSIGN(OmniboxViewViews);
};
diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi
index b0c6b2f..cb8989e 100644
--- a/chrome/chrome_browser.gypi
+++ b/chrome/chrome_browser.gypi
@@ -4787,8 +4787,6 @@
['include', '^browser/ui/views/location_bar/page_action_with_badge_view.h'],
['include', '^browser/ui/views/location_bar/selected_keyword_view.cc'],
['include', '^browser/ui/views/location_bar/selected_keyword_view.h'],
- ['include', '^browser/ui/views/location_bar/suggested_text_view.cc'],
- ['include', '^browser/ui/views/location_bar/suggested_text_view.h'],
['include', '^browser/ui/views/location_bar/star_view.cc'],
['include', '^browser/ui/views/location_bar/star_view.h'],
['include', '^browser/ui/views/notifications/balloon_view.cc'],