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

Side by Side Diff: chrome/browser/ui/views/omnibox/touch_omnibox_popup_contents_view.h

Issue 15745031: Restyle omnibox popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Go back to 3 max search suggestions for now Created 7 years, 6 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
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_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h" 9 #include "chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h"
10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h" 10 #include "chrome/browser/ui/views/omnibox/omnibox_result_view.h"
11 11
12 class OmniboxEditModel; 12 class OmniboxEditModel;
13 class OmniboxView; 13 class OmniboxView;
14 14
15 namespace gfx { 15 namespace gfx {
16 class Canvas; 16 class Canvas;
17 } 17 }
18 18
19 namespace views { 19 namespace views {
20 class View; 20 class View;
21 } 21 }
22 22
23 class TouchOmniboxResultView : public OmniboxResultView { 23 class TouchOmniboxResultView : public OmniboxResultView {
24 public: 24 public:
25 TouchOmniboxResultView(OmniboxResultViewModel* model, 25 TouchOmniboxResultView(OmniboxResultViewModel* model,
26 int model_index, 26 int model_index,
27 views::View* location_bar, 27 OmniboxViewDelegate* view_delegate,
28 const gfx::Font& font); 28 const gfx::Font& font);
29 29
30 private: 30 private:
31 virtual ~TouchOmniboxResultView(); 31 virtual ~TouchOmniboxResultView();
32 32
33 // OmniboxResultView: 33 // OmniboxResultView:
34 virtual void PaintMatch(gfx::Canvas* canvas, 34 virtual void PaintMatch(gfx::Canvas* canvas,
35 const AutocompleteMatch& match, 35 const AutocompleteMatch& match,
36 int x) OVERRIDE; 36 int x) OVERRIDE;
37 virtual int GetTextHeight() const OVERRIDE; 37 virtual int GetTextHeight() const OVERRIDE;
38 38
39 DISALLOW_COPY_AND_ASSIGN(TouchOmniboxResultView); 39 DISALLOW_COPY_AND_ASSIGN(TouchOmniboxResultView);
40 }; 40 };
41 41
42 class TouchOmniboxPopupContentsView 42 class TouchOmniboxPopupContentsView
43 : public OmniboxPopupContentsView { 43 : public OmniboxPopupContentsView {
44 public: 44 public:
45 TouchOmniboxPopupContentsView(const gfx::Font& font, 45 TouchOmniboxPopupContentsView(const gfx::Font& font,
46 OmniboxView* omnibox_view, 46 OmniboxView* omnibox_view,
47 OmniboxEditModel* edit_model, 47 OmniboxEditModel* edit_model,
48 views::View* location_bar); 48 OmniboxViewDelegate* view_delegate);
49 virtual ~TouchOmniboxPopupContentsView(); 49 virtual ~TouchOmniboxPopupContentsView();
50 50
51 // OmniboxPopupContentsView: 51 // OmniboxPopupContentsView:
52 virtual void UpdatePopupAppearance() OVERRIDE; 52 virtual void UpdatePopupAppearance() OVERRIDE;
53 53
54 protected: 54 protected:
55 // OmniboxPopupContentsView: 55 // OmniboxPopupContentsView:
56 virtual void PaintResultViews(gfx::Canvas* canvas) OVERRIDE; 56 virtual void PaintResultViews(gfx::Canvas* canvas) OVERRIDE;
57 virtual OmniboxResultView* CreateResultView(OmniboxResultViewModel* model, 57 virtual OmniboxResultView* CreateResultView(OmniboxResultViewModel* model,
58 int model_index, 58 int model_index,
59 const gfx::Font& font) OVERRIDE; 59 const gfx::Font& font) OVERRIDE;
60 60
61 private: 61 private:
62 std::vector<View*> GetVisibleChildren(); 62 std::vector<View*> GetVisibleChildren();
63 63
64 DISALLOW_COPY_AND_ASSIGN(TouchOmniboxPopupContentsView); 64 DISALLOW_COPY_AND_ASSIGN(TouchOmniboxPopupContentsView);
65 }; 65 };
66 66
67 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 67 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_TOUCH_OMNIBOX_POPUP_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698