| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 void OnMouseEntered(const ui::MouseEvent& event) override; | 66 void OnMouseEntered(const ui::MouseEvent& event) override; |
| 67 void OnMouseExited(const ui::MouseEvent& event) override; | 67 void OnMouseExited(const ui::MouseEvent& event) override; |
| 68 void OnGestureEvent(ui::GestureEvent* event) override; | 68 void OnGestureEvent(ui::GestureEvent* event) override; |
| 69 | 69 |
| 70 bool IsSelectedIndex(size_t index) const; | 70 bool IsSelectedIndex(size_t index) const; |
| 71 bool IsHoveredIndex(size_t index) const; | 71 bool IsHoveredIndex(size_t index) const; |
| 72 gfx::Image GetIconIfExtensionMatch(size_t index) const; | 72 gfx::Image GetIconIfExtensionMatch(size_t index) const; |
| 73 bool IsStarredMatch(const AutocompleteMatch& match) const; | 73 bool IsStarredMatch(const AutocompleteMatch& match) const; |
| 74 | 74 |
| 75 int max_match_contents_width() const { return max_match_contents_width_; } | 75 int max_match_contents_width() const { return max_match_contents_width_; } |
| 76 int start_margin() const { return start_margin_; } | |
| 77 int end_margin() const { return end_margin_; } | |
| 78 | 76 |
| 79 protected: | 77 protected: |
| 80 OmniboxPopupContentsView(const gfx::FontList& font_list, | 78 OmniboxPopupContentsView(const gfx::FontList& font_list, |
| 81 OmniboxView* omnibox_view, | 79 OmniboxView* omnibox_view, |
| 82 OmniboxEditModel* edit_model, | 80 OmniboxEditModel* edit_model, |
| 83 LocationBarView* location_bar_view); | 81 LocationBarView* location_bar_view); |
| 84 ~OmniboxPopupContentsView() override; | 82 ~OmniboxPopupContentsView() override; |
| 85 | 83 |
| 86 LocationBarView* location_bar_view() { return location_bar_view_; } | 84 LocationBarView* location_bar_view() { return location_bar_view_; } |
| 87 | 85 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 164 |
| 167 // When the dropdown is not wide enough while displaying postfix suggestions, | 165 // When the dropdown is not wide enough while displaying postfix suggestions, |
| 168 // we use the width of widest match contents to shift the suggestions so that | 166 // we use the width of widest match contents to shift the suggestions so that |
| 169 // the widest suggestion just reaches the end edge. | 167 // the widest suggestion just reaches the end edge. |
| 170 int max_match_contents_width_; | 168 int max_match_contents_width_; |
| 171 | 169 |
| 172 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 170 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
| 173 }; | 171 }; |
| 174 | 172 |
| 175 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 173 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
| OLD | NEW |