Chromium Code Reviews| 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; | |
|
oshima
2011/02/16 20:00:27
add new line between namespaces.
varunjain
2011/02/16 23:12:37
Done.
| |
| 15 namespace gfx { | |
| 16 class Canvas; | |
| 17 class CanvasSkia; | |
| 18 } | |
| 19 namespace views { | |
| 20 class View; | |
| 21 } | |
| 22 | |
| 23 class TouchAutocompleteResultView : public AutocompleteResultView { | |
| 24 public: | |
| 25 TouchAutocompleteResultView(AutocompleteResultViewModel* model, | |
| 26 int model_index, | |
| 27 const gfx::Font& font, | |
| 28 const gfx::Font& bold_font); | |
| 29 virtual ~TouchAutocompleteResultView(); | |
| 30 | |
| 31 // AutocompleteResultView overrides. | |
| 32 virtual void Layout(); | |
| 33 virtual gfx::Size GetPreferredSize(); | |
| 34 | |
| 35 protected: | |
| 36 virtual void PaintMatch(gfx::Canvas* canvas, | |
| 37 const AutocompleteMatch& match, | |
| 38 int x); | |
| 39 | |
| 40 private: | |
| 41 int GetFontHeight(); | |
|
oshima
2011/02/16 20:00:27
can this be const?
DISALLOW_COPY_AND_ASSIGN
varunjain
2011/02/16 23:12:37
Done.
| |
| 42 }; | |
| 43 | |
| 44 class TouchAutocompletePopupContentsView: public AutocompletePopupContentsView { | |
| 45 public: | |
| 46 TouchAutocompletePopupContentsView(const gfx::Font& font, | |
| 47 AutocompleteEditView* edit_view, | |
| 48 AutocompleteEditModel* edit_model, | |
| 49 Profile* profile, | |
| 50 const views::View* location_bar); | |
| 51 virtual ~TouchAutocompletePopupContentsView(); | |
| 52 | |
| 53 // AutocompletePopupContentsView overrides. | |
| 54 virtual void UpdatePopupAppearance(); | |
| 55 virtual void PaintChildren(gfx::CanvasSkia* canvas); | |
| 56 virtual void LayoutChildren(); | |
| 57 | |
| 58 protected: | |
| 59 // AutocompletePopupContentsView overrides. | |
| 60 virtual int CalculatePopupHeight(); | |
| 61 virtual AutocompleteResultView* CreateResultView( | |
| 62 AutocompleteResultViewModel* model, | |
| 63 int model_index, | |
| 64 const gfx::Font& font, | |
| 65 const gfx::Font& bold_font); | |
| 66 | |
| 67 private: | |
| 68 int GetVisibleChildCount(); | |
|
oshima
2011/02/16 20:00:27
const?
varunjain
2011/02/16 23:12:37
Done.
| |
| 69 | |
|
oshima
2011/02/16 20:00:27
DISALLOW_COPY_AND_ASSIGN
varunjain
2011/02/16 23:12:37
Done.
| |
| 70 }; | |
| 71 | |
| 72 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENT S_VIEW_H_ | |
| OLD | NEW |