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

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: addressed reviewer comments 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 #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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698