Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_V IEW_H_ | 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_ | 6 #define CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_V IEW_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h" | 10 #include "chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view. h" |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 class View; | 21 class View; |
| 22 } | 22 } |
| 23 | 23 |
| 24 class TouchAutocompleteResultView : public AutocompleteResultView { | 24 class TouchAutocompleteResultView : public AutocompleteResultView { |
| 25 public: | 25 public: |
| 26 TouchAutocompleteResultView(AutocompleteResultViewModel* model, | 26 TouchAutocompleteResultView(AutocompleteResultViewModel* model, |
| 27 int model_index, | 27 int model_index, |
| 28 const gfx::Font& font, | 28 const gfx::Font& font, |
| 29 const gfx::Font& bold_font); | 29 const gfx::Font& bold_font); |
| 30 | 30 |
| 31 using AutocompleteResultView::GetState; | |
|
Peter Kasting
2012/05/04 23:33:31
Nit: I tend to prefer avoiding using statements, a
Jói
2012/05/04 23:52:19
This one is just to make the method public in this
| |
| 32 | |
| 31 private: | 33 private: |
| 32 virtual ~TouchAutocompleteResultView(); | 34 virtual ~TouchAutocompleteResultView(); |
| 33 | 35 |
| 34 // AutocompleteResultView: | 36 // AutocompleteResultView: |
| 35 virtual void PaintMatch(gfx::Canvas* canvas, | 37 virtual void PaintMatch(gfx::Canvas* canvas, |
| 36 const AutocompleteMatch& match, | 38 const AutocompleteMatch& match, |
| 37 int x) OVERRIDE; | 39 int x) OVERRIDE; |
| 38 virtual int GetTextHeight() const OVERRIDE; | 40 virtual int GetTextHeight() const OVERRIDE; |
| 41 virtual void AdjustIconBounds(const AutocompleteMatch& match, | |
| 42 gfx::Rect* bounds) OVERRIDE; | |
| 39 | 43 |
| 40 DISALLOW_COPY_AND_ASSIGN(TouchAutocompleteResultView); | 44 DISALLOW_COPY_AND_ASSIGN(TouchAutocompleteResultView); |
| 41 }; | 45 }; |
| 42 | 46 |
| 43 class TouchAutocompletePopupContentsView | 47 class TouchAutocompletePopupContentsView |
| 44 : public AutocompletePopupContentsView { | 48 : public AutocompletePopupContentsView { |
| 45 public: | 49 public: |
| 46 TouchAutocompletePopupContentsView(const gfx::Font& font, | 50 TouchAutocompletePopupContentsView(const gfx::Font& font, |
| 47 OmniboxView* omnibox_view, | 51 OmniboxView* omnibox_view, |
| 48 AutocompleteEditModel* edit_model, | 52 AutocompleteEditModel* edit_model, |
| 49 views::View* location_bar); | 53 views::View* location_bar); |
| 50 virtual ~TouchAutocompletePopupContentsView(); | 54 virtual ~TouchAutocompletePopupContentsView(); |
| 51 | 55 |
| 52 // AutocompletePopupContentsView: | 56 // AutocompletePopupContentsView: |
| 53 virtual void UpdatePopupAppearance() OVERRIDE; | 57 virtual void UpdatePopupAppearance() OVERRIDE; |
| 54 virtual void LayoutChildren() OVERRIDE; | |
| 55 | 58 |
| 56 protected: | 59 protected: |
| 57 // AutocompletePopupContentsView: | 60 // AutocompletePopupContentsView: |
| 58 virtual void PaintResultViews(gfx::Canvas* canvas) OVERRIDE; | 61 virtual void PaintResultViews(gfx::Canvas* canvas) OVERRIDE; |
| 59 virtual int CalculatePopupHeight() OVERRIDE; | |
| 60 virtual AutocompleteResultView* CreateResultView( | 62 virtual AutocompleteResultView* CreateResultView( |
| 61 AutocompleteResultViewModel* model, | 63 AutocompleteResultViewModel* model, |
| 62 int model_index, | 64 int model_index, |
| 63 const gfx::Font& font, | 65 const gfx::Font& font, |
| 64 const gfx::Font& bold_font) OVERRIDE; | 66 const gfx::Font& bold_font) OVERRIDE; |
| 65 | 67 |
| 66 private: | 68 private: |
| 67 std::vector<View*> GetVisibleChildren(); | 69 std::vector<View*> GetVisibleChildren(); |
| 68 | 70 |
| 69 DISALLOW_COPY_AND_ASSIGN(TouchAutocompletePopupContentsView); | 71 DISALLOW_COPY_AND_ASSIGN(TouchAutocompletePopupContentsView); |
| 70 }; | 72 }; |
| 71 | 73 |
| 72 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENT S_VIEW_H_ | 74 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENT S_VIEW_H_ |
| OLD | NEW |