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_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
7 | 7 |
8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" | 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" |
10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" | 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 virtual int CalculatePopupHeight(); | 89 virtual int CalculatePopupHeight(); |
90 virtual OmniboxResultView* CreateResultView(int model_index, | 90 virtual OmniboxResultView* CreateResultView(int model_index, |
91 const gfx::FontList& font_list); | 91 const gfx::FontList& font_list); |
92 | 92 |
93 // Overridden from views::View: | 93 // Overridden from views::View: |
94 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 94 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
95 // This method should not be triggered directly as we paint our children | 95 // This method should not be triggered directly as we paint our children |
96 // in an un-conventional way inside OnPaint. We use a separate canvas to | 96 // in an un-conventional way inside OnPaint. We use a separate canvas to |
97 // paint the children. Hence we override this method to a no-op so that | 97 // paint the children. Hence we override this method to a no-op so that |
98 // the view hierarchy does not "accidentally" trigger this. | 98 // the view hierarchy does not "accidentally" trigger this. |
99 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 99 virtual void PaintChildren(gfx::Canvas* canvas, |
| 100 const views::CullSet& cull_set) OVERRIDE; |
100 | 101 |
101 scoped_ptr<OmniboxPopupModel> model_; | 102 scoped_ptr<OmniboxPopupModel> model_; |
102 | 103 |
103 private: | 104 private: |
104 class AutocompletePopupWidget; | 105 class AutocompletePopupWidget; |
105 | 106 |
106 // Call immediately after construction. | 107 // Call immediately after construction. |
107 void Init(); | 108 void Init(); |
108 | 109 |
109 // Returns true if the model has a match at the specified index. | 110 // Returns true if the model has a match at the specified index. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 172 |
172 // When the dropdown is not wide enough while displaying postfix suggestions, | 173 // When the dropdown is not wide enough while displaying postfix suggestions, |
173 // we use the width of widest match contents to shift the suggestions so that | 174 // we use the width of widest match contents to shift the suggestions so that |
174 // the widest suggestion just reaches the end edge. | 175 // the widest suggestion just reaches the end edge. |
175 int max_match_contents_width_; | 176 int max_match_contents_width_; |
176 | 177 |
177 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 178 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
178 }; | 179 }; |
179 | 180 |
180 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 181 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
OLD | NEW |