Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Side by Side Diff: chrome/browser/ui/views/autocomplete/touch_autocomplete_popup_contents_view.h

Issue 6349101: Create a new autocomplete popup for touch. This CL depends on (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: merged changes from refactoring CL Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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
11 class AutocompleteEditView;
12 class AutocompleteEditModel;
13 class Profile;
14 namespace gfx {
15 class Canvas;
16 class CanvasSkia;
17 }
18 namespace views {
19 class View;
20 }
21
22 class TouchAutocompleteResultView : public AutocompleteResultView {
23 public:
24 TouchAutocompleteResultView(AutocompleteResultViewModel* model,
25 int model_index,
26 const gfx::Font& font,
27 const gfx::Font& bold_font);
28 virtual ~TouchAutocompleteResultView();
29
30 // AutocompleteResultView overrides.
31 virtual void Layout();
32 virtual gfx::Size GetPreferredSize();
33
34 protected:
35 virtual void PaintMatch(gfx::Canvas* canvas,
36 const AutocompleteMatch& match,
37 int x);
38 };
39
40 class TouchAutocompletePopupContentsView: public AutocompletePopupContentsView {
41 public:
42 TouchAutocompletePopupContentsView(const gfx::Font& font,
43 AutocompleteEditView* edit_view,
44 AutocompleteEditModel* edit_model,
45 Profile* profile,
46 const views::View* location_bar);
47 virtual ~TouchAutocompletePopupContentsView();
48
49 // AutocompletePopupContentsView overrides.
50 virtual void UpdatePopupAppearance();
51 virtual void PaintChildren(gfx::CanvasSkia* canvas);
52 virtual void LayoutChildren();
53
54 protected:
55 // AutocompletePopupContentsView overrides.
56 virtual int CalculatePopupHeight();
57 virtual AutocompleteResultView* CreateResultView(
58 AutocompleteResultViewModel* model,
59 int model_index,
60 const gfx::Font& font,
61 const gfx::Font& bold_font);
62
63 private:
64 int GetVisibleChildCount();
65
66 };
67
68 #endif // CHROME_BROWSER_UI_VIEWS_AUTOCOMPLETE_TOUCH_AUTOCOMPLETE_POPUP_CONTENT S_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698