OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_V
IEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_V
IEW_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.
h" |
| 10 #include "chrome/browser/ui/views/autocomplete/autocomplete_result_view.h" |
| 11 |
| 12 class AutocompleteEditView; |
| 13 class AutocompleteEditModel; |
| 14 class Profile; |
| 15 |
| 16 namespace gfx { |
| 17 class Canvas; |
| 18 class CanvasSkia; |
| 19 } |
| 20 |
| 21 namespace views { |
| 22 class View; |
| 23 } |
| 24 |
| 25 class TouchAutocompleteResultView : public AutocompleteResultView { |
| 26 public: |
| 27 TouchAutocompleteResultView(AutocompleteResultViewModel* model, |
| 28 int model_index, |
| 29 const gfx::Font& font, |
| 30 const gfx::Font& bold_font); |
| 31 |
| 32 private: |
| 33 virtual ~TouchAutocompleteResultView(); |
| 34 |
| 35 // AutocompleteResultView: |
| 36 virtual void Layout(); |
| 37 virtual gfx::Size GetPreferredSize(); |
| 38 virtual void PaintMatch(gfx::Canvas* canvas, |
| 39 const AutocompleteMatch& match, |
| 40 int x); |
| 41 |
| 42 int GetFontHeight() const; |
| 43 |
| 44 DISALLOW_COPY_AND_ASSIGN(TouchAutocompleteResultView); |
| 45 }; |
| 46 |
| 47 class TouchAutocompletePopupContentsView |
| 48 : public AutocompletePopupContentsView { |
| 49 public: |
| 50 TouchAutocompletePopupContentsView(const gfx::Font& font, |
| 51 AutocompleteEditView* edit_view, |
| 52 AutocompleteEditModel* edit_model, |
| 53 Profile* profile, |
| 54 const views::View* location_bar); |
| 55 virtual ~TouchAutocompletePopupContentsView(); |
| 56 |
| 57 // AutocompletePopupContentsView: |
| 58 virtual void UpdatePopupAppearance(); |
| 59 virtual void PaintChildren(gfx::CanvasSkia* canvas); |
| 60 virtual void LayoutChildren(); |
| 61 |
| 62 protected: |
| 63 // AutocompletePopupContentsView: |
| 64 virtual int CalculatePopupHeight(); |
| 65 virtual AutocompleteResultView* CreateResultView( |
| 66 AutocompleteResultViewModel* model, |
| 67 int model_index, |
| 68 const gfx::Font& font, |
| 69 const gfx::Font& bold_font); |
| 70 |
| 71 private: |
| 72 std::vector<View*> GetVisibleChildren(); |
| 73 |
| 74 DISALLOW_COPY_AND_ASSIGN(TouchAutocompletePopupContentsView); |
| 75 }; |
| 76 |
| 77 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENT
S_VIEW_H_ |
OLD | NEW |