Chromium Code Reviews| 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..7b82faeaa432fab01170c3859288fe7cd80e6297 |
| --- /dev/null |
| +++ b/chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h |
| @@ -0,0 +1,72 @@ |
| +// 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; |
|
oshima
2011/02/16 20:00:27
add new line between namespaces.
varunjain
2011/02/16 23:12:37
Done.
|
| +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. |
| + virtual void Layout(); |
| + virtual gfx::Size GetPreferredSize(); |
| + |
| + protected: |
| + virtual void PaintMatch(gfx::Canvas* canvas, |
| + const AutocompleteMatch& match, |
| + int x); |
| + |
| + private: |
| + 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.
|
| +}; |
| + |
| +class TouchAutocompletePopupContentsView: public AutocompletePopupContentsView { |
| + 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(); |
|
oshima
2011/02/16 20:00:27
const?
varunjain
2011/02/16 23:12:37
Done.
|
| + |
|
oshima
2011/02/16 20:00:27
DISALLOW_COPY_AND_ASSIGN
varunjain
2011/02/16 23:12:37
Done.
|
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENTS_VIEW_H_ |