diff options
author | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 22:06:46 +0000 |
---|---|---|
committer | rohitrao@chromium.org <rohitrao@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-10 22:06:46 +0000 |
commit | cc4c9e1dca4f95d322aedff8e520621f4cee5087 (patch) | |
tree | 849eabbe8cf34a2182eb1c602fd626737768221e /chrome/browser/autocomplete | |
parent | 9453717fdb0fa019cdd126132f35e75c0b504761 (diff) | |
download | chromium_src-cc4c9e1dca4f95d322aedff8e520621f4cee5087.zip chromium_src-cc4c9e1dca4f95d322aedff8e520621f4cee5087.tar.gz chromium_src-cc4c9e1dca4f95d322aedff8e520621f4cee5087.tar.bz2 |
Removes the #ifdef around Instant-related AutocompleteEditController methods. Adds empty implementations on Mac and Linux.
BUG=56385
TEST=No visible impact.
Review URL: http://codereview.chromium.org/3625004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62125 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete')
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit.cc | 5 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit.h | 4 | ||||
-rw-r--r-- | chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc | 4 |
3 files changed, 1 insertions, 12 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_edit.cc b/chrome/browser/autocomplete/autocomplete_edit.cc index 49b687b..dd6b14c 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.cc +++ b/chrome/browser/autocomplete/autocomplete_edit.cc @@ -403,9 +403,8 @@ void AutocompleteEditModel::OpenURL(const GURL& url, // search engine, if applicable; see comments in template_url.h. } -#if defined(TOOLKIT_VIEWS) controller_->OnAutocompleteWillAccept(); -#endif + if (disposition != NEW_BACKGROUND_TAB) view_->RevertAll(); // Revert the box to its unedited state controller_->OnAutocompleteAccept(url, disposition, transition, @@ -677,9 +676,7 @@ bool AutocompleteEditModel::OnAfterPossibleChange(const std::wstring& new_text, } void AutocompleteEditModel::PopupBoundsChangedTo(const gfx::Rect& bounds) { -#if defined(TOOLKIT_VIEWS) controller_->OnPopupBoundsChanged(bounds); -#endif } // Return true if the suggestion type warrants a TCP/IP preconnection. diff --git a/chrome/browser/autocomplete/autocomplete_edit.h b/chrome/browser/autocomplete/autocomplete_edit.h index 33420dd..a9cdf1a 100644 --- a/chrome/browser/autocomplete/autocomplete_edit.h +++ b/chrome/browser/autocomplete/autocomplete_edit.h @@ -33,7 +33,6 @@ class Rect; // Embedders of an AutocompleteEdit widget must implement this class. class AutocompleteEditController { public: -#if defined(TOOLKIT_VIEWS) // Sent when the autocomplete popup is about to close. virtual void OnAutocompleteWillClosePopup() = 0; @@ -51,9 +50,6 @@ class AutocompleteEditController { // Invoked when the popup is going to change its bounds to |bounds|. virtual void OnPopupBoundsChanged(const gfx::Rect& bounds) = 0; -#else - // TODO: port. -#endif // When the user presses enter or selects a line with the mouse, this // function will get called synchronously with the url to open and diff --git a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc index 0991524..ee94a96 100644 --- a/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc +++ b/chrome/browser/autocomplete/autocomplete_edit_view_gtk.cc @@ -513,10 +513,8 @@ void AutocompleteEditViewGtk::UpdatePopup() { } void AutocompleteEditViewGtk::ClosePopup() { -#if defined(TOOLKIT_VIEWS) if (popup_view_->GetModel()->IsOpen()) controller_->OnAutocompleteWillClosePopup(); -#endif popup_view_->GetModel()->StopAutocomplete(); } @@ -948,11 +946,9 @@ gboolean AutocompleteEditViewGtk::HandleViewFocusIn(GtkWidget* sender, gboolean AutocompleteEditViewGtk::HandleViewFocusOut(GtkWidget* sender, GdkEventFocus* event) { -#if defined(TOOLKIT_VIEWS) // This must be invoked before ClosePopup. // TODO: figure out who is getting focus. controller_->OnAutocompleteLosingFocus(NULL); -#endif // Close the popup. ClosePopup(); |