Chromium Code Reviews| 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 "components/omnibox/browser/omnibox_popup_model.h" | 9 #include "components/omnibox/browser/omnibox_popup_model.h" |
| 10 #include "components/omnibox/browser/omnibox_popup_view.h" | 10 #include "components/omnibox/browser/omnibox_popup_view.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 void OnMouseExited(const ui::MouseEvent& event) override; | 63 void OnMouseExited(const ui::MouseEvent& event) override; |
| 64 void OnGestureEvent(ui::GestureEvent* event) override; | 64 void OnGestureEvent(ui::GestureEvent* event) override; |
| 65 | 65 |
| 66 bool IsSelectedIndex(size_t index) const; | 66 bool IsSelectedIndex(size_t index) const; |
| 67 bool IsHoveredIndex(size_t index) const; | 67 bool IsHoveredIndex(size_t index) const; |
| 68 gfx::Image GetIconIfExtensionMatch(size_t index) const; | 68 gfx::Image GetIconIfExtensionMatch(size_t index) const; |
| 69 bool IsStarredMatch(const AutocompleteMatch& match) const; | 69 bool IsStarredMatch(const AutocompleteMatch& match) const; |
| 70 | 70 |
| 71 int max_match_contents_width() const { | 71 int max_match_contents_width() const { |
| 72 return max_match_contents_width_; | 72 return max_match_contents_width_; |
| 73 } | 73 } |
|
Peter Kasting
2015/08/24 18:20:00
Nit: I'd probably just do all these getters in a b
tdanderson
2015/08/24 22:39:16
Done.
| |
| 74 | 74 |
| 75 int left_margin() const { | |
| 76 return left_margin_; | |
| 77 } | |
| 78 | |
| 79 int right_margin() const { | |
| 80 return right_margin_; | |
| 81 } | |
| 82 | |
| 75 protected: | 83 protected: |
| 76 OmniboxPopupContentsView(const gfx::FontList& font_list, | 84 OmniboxPopupContentsView(const gfx::FontList& font_list, |
| 77 OmniboxView* omnibox_view, | 85 OmniboxView* omnibox_view, |
| 78 OmniboxEditModel* edit_model, | 86 OmniboxEditModel* edit_model, |
| 79 LocationBarView* location_bar_view); | 87 LocationBarView* location_bar_view); |
| 80 ~OmniboxPopupContentsView() override; | 88 ~OmniboxPopupContentsView() override; |
| 81 | 89 |
| 82 LocationBarView* location_bar_view() { return location_bar_view_; } | 90 LocationBarView* location_bar_view() { return location_bar_view_; } |
| 83 | 91 |
| 84 // Calculates the height needed to show all the results in the model. | 92 // Calculates the height needed to show all the results in the model. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 160 | 168 |
| 161 // When the dropdown is not wide enough while displaying postfix suggestions, | 169 // When the dropdown is not wide enough while displaying postfix suggestions, |
| 162 // we use the width of widest match contents to shift the suggestions so that | 170 // we use the width of widest match contents to shift the suggestions so that |
| 163 // the widest suggestion just reaches the end edge. | 171 // the widest suggestion just reaches the end edge. |
| 164 int max_match_contents_width_; | 172 int max_match_contents_width_; |
| 165 | 173 |
| 166 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 174 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
| 167 }; | 175 }; |
| 168 | 176 |
| 169 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 177 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
| OLD | NEW |