Index: chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h |
diff --git a/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..cc12094e0db5fb603e6750a92ca31940b9c23088 |
--- /dev/null |
+++ b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h |
@@ -0,0 +1,77 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
+#define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |
+#pragma once |
+ |
+#include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.h" |
+#include "chrome/browser/ui/views/autocomplete/autocomplete_result_view.h" |
+ |
+class AutocompleteEditView; |
+class AutocompleteEditModel; |
+class Profile; |
+ |
+namespace gfx { |
+class Canvas; |
+class CanvasSkia; |
+} |
+ |
+namespace views { |
+class View; |
+} |
+ |
+class TouchAutocompleteResultView : public AutocompleteResultView { |
+ public: |
+ TouchAutocompleteResultView(AutocompleteResultViewModel* model, |
+ int model_index, |
+ const gfx::Font& font, |
+ const gfx::Font& bold_font); |
+ virtual ~TouchAutocompleteResultView(); |
+ |
+ // AutocompleteResultView overrides. |
Peter Kasting
2011/02/17 23:08:57
Nit: In new code I prefer just the classname plus
varunjain
2011/02/18 00:16:34
Done.
|
+ virtual void Layout(); |
Peter Kasting
2011/02/17 23:08:57
Nit: Can all the public and protected functions in
varunjain
2011/02/18 00:16:34
Done.
|
+ virtual gfx::Size GetPreferredSize(); |
+ |
+ protected: |
+ virtual void PaintMatch(gfx::Canvas* canvas, |
+ const AutocompleteMatch& match, |
+ int x); |
+ |
+ private: |
+ int GetFontHeight() const; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(TouchAutocompleteResultView); |
+}; |
+ |
+class TouchAutocompletePopupContentsView: public AutocompletePopupContentsView { |
Peter Kasting
2011/02/17 23:08:57
Nit: Space before ':'
varunjain
2011/02/18 00:16:34
Done.
|
+ public: |
+ TouchAutocompletePopupContentsView(const gfx::Font& font, |
+ AutocompleteEditView* edit_view, |
+ AutocompleteEditModel* edit_model, |
+ Profile* profile, |
+ const views::View* location_bar); |
+ virtual ~TouchAutocompletePopupContentsView(); |
+ |
+ // AutocompletePopupContentsView overrides. |
+ virtual void UpdatePopupAppearance(); |
+ virtual void PaintChildren(gfx::CanvasSkia* canvas); |
+ virtual void LayoutChildren(); |
+ |
+ protected: |
+ // AutocompletePopupContentsView overrides. |
+ virtual int CalculatePopupHeight(); |
+ virtual AutocompleteResultView* CreateResultView( |
+ AutocompleteResultViewModel* model, |
+ int model_index, |
+ const gfx::Font& font, |
+ const gfx::Font& bold_font); |
+ |
+ private: |
+ int GetVisibleChildCount() const; |
Peter Kasting
2011/02/17 23:08:57
Nit: These two lines are indented too far
varunjain
2011/02/18 00:16:34
Done.
|
+ |
+ DISALLOW_COPY_AND_ASSIGN(TouchAutocompletePopupContentsView); |
+}; |
+ |
+#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |