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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 void UpdateLineEvent(const ui::LocatedEvent& event, | 120 void UpdateLineEvent(const ui::LocatedEvent& event, |
121 bool should_set_selected_line); | 121 bool should_set_selected_line); |
122 | 122 |
123 // Opens an entry from the list depending on the event and the selected | 123 // Opens an entry from the list depending on the event and the selected |
124 // disposition. | 124 // disposition. |
125 void OpenSelectedLine(const ui::LocatedEvent& event, | 125 void OpenSelectedLine(const ui::LocatedEvent& event, |
126 WindowOpenDisposition disposition); | 126 WindowOpenDisposition disposition); |
127 | 127 |
128 OmniboxResultView* result_view_at(size_t i); | 128 OmniboxResultView* result_view_at(size_t i); |
129 | 129 |
130 scoped_ptr<OmniboxPopupModel> model_; | 130 std::unique_ptr<OmniboxPopupModel> model_; |
131 | 131 |
132 // The popup that contains this view. We create this, but it deletes itself | 132 // The popup that contains this view. We create this, but it deletes itself |
133 // when its window is destroyed. This is a WeakPtr because it's possible for | 133 // when its window is destroyed. This is a WeakPtr because it's possible for |
134 // the OS to destroy the window and thus delete this object before we're | 134 // the OS to destroy the window and thus delete this object before we're |
135 // deleted, or without our knowledge. | 135 // deleted, or without our knowledge. |
136 base::WeakPtr<AutocompletePopupWidget> popup_; | 136 base::WeakPtr<AutocompletePopupWidget> popup_; |
137 | 137 |
138 // The edit view that invokes us. | 138 // The edit view that invokes us. |
139 OmniboxView* omnibox_view_; | 139 OmniboxView* omnibox_view_; |
140 | 140 |
(...skipping 25 matching lines...) Expand all Loading... |
166 | 166 |
167 // When the dropdown is not wide enough while displaying postfix suggestions, | 167 // 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 | 168 // we use the width of widest match contents to shift the suggestions so that |
169 // the widest suggestion just reaches the end edge. | 169 // the widest suggestion just reaches the end edge. |
170 int max_match_contents_width_; | 170 int max_match_contents_width_; |
171 | 171 |
172 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 172 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
173 }; | 173 }; |
174 | 174 |
175 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 175 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
OLD | NEW |