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

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h

Issue 10384007: First stab at touch optimized omnibox auto-complete per sgabriel's mocks. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments. Created 8 years, 7 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
index ffd2f01cc806dca6a13ec3fddf0aacd306df260c..e05f29fabbf172f691a1bd4c4b9acaad2b9d8eb8 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h
@@ -32,11 +32,13 @@ class AutocompletePopupContentsView : public views::View,
public AutocompletePopupView,
public ui::AnimationDelegate {
public:
- AutocompletePopupContentsView(const gfx::Font& font,
- OmniboxView* omnibox_view,
- AutocompleteEditModel* edit_model,
- views::View* location_bar);
- virtual ~AutocompletePopupContentsView();
+ // Creates the appropriate type of omnibox dropdown for the
+ // current environment, e.g. desktop vs. touch optimized layout.
+ static AutocompletePopupContentsView* CreateForEnvironment(
+ const gfx::Font& font,
+ OmniboxView* omnibox_view,
+ AutocompleteEditModel* edit_model,
+ views::View* location_bar);
// Returns the bounds the popup should be shown at. This is the display bounds
// and includes offsets for the dropshadow which this view's border renders.
@@ -73,6 +75,12 @@ class AutocompletePopupContentsView : public views::View,
virtual void OnMouseExited(const views::MouseEvent& event) OVERRIDE;
protected:
+ AutocompletePopupContentsView(const gfx::Font& font,
+ OmniboxView* omnibox_view,
+ AutocompleteEditModel* edit_model,
+ views::View* location_bar);
+ virtual ~AutocompletePopupContentsView();
+
virtual void PaintResultViews(gfx::Canvas* canvas);
// Calculates the height needed to show all the results in the model.
@@ -96,6 +104,9 @@ class AutocompletePopupContentsView : public views::View,
private:
class AutocompletePopupWidget;
+ // Call immediately after construction.
+ void Init();
+
// Returns true if the model has a match at the specified index.
bool HasMatchAt(size_t index) const;
« no previous file with comments | « no previous file | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698