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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 bool should_set_selected_line); | 138 bool should_set_selected_line); |
139 | 139 |
140 // Opens an entry from the list depending on the event and the selected | 140 // Opens an entry from the list depending on the event and the selected |
141 // disposition. | 141 // disposition. |
142 void OpenSelectedLine(const ui::LocatedEvent& event, | 142 void OpenSelectedLine(const ui::LocatedEvent& event, |
143 WindowOpenDisposition disposition); | 143 WindowOpenDisposition disposition); |
144 | 144 |
145 // Returns the target bounds given the specified content height. | 145 // Returns the target bounds given the specified content height. |
146 gfx::Rect CalculateTargetBounds(int h); | 146 gfx::Rect CalculateTargetBounds(int h); |
147 | 147 |
| 148 OmniboxResultView* result_view_at(size_t i); |
| 149 |
148 // The popup that contains this view. We create this, but it deletes itself | 150 // The popup that contains this view. We create this, but it deletes itself |
149 // when its window is destroyed. This is a WeakPtr because it's possible for | 151 // when its window is destroyed. This is a WeakPtr because it's possible for |
150 // the OS to destroy the window and thus delete this object before we're | 152 // the OS to destroy the window and thus delete this object before we're |
151 // deleted, or without our knowledge. | 153 // deleted, or without our knowledge. |
152 base::WeakPtr<AutocompletePopupWidget> popup_; | 154 base::WeakPtr<AutocompletePopupWidget> popup_; |
153 | 155 |
154 // The edit view that invokes us. | 156 // The edit view that invokes us. |
155 OmniboxView* omnibox_view_; | 157 OmniboxView* omnibox_view_; |
156 | 158 |
157 Profile* profile_; | 159 Profile* profile_; |
(...skipping 22 matching lines...) Expand all Loading... |
180 // The popup sizes vertically using an animation when the popup is getting | 182 // The popup sizes vertically using an animation when the popup is getting |
181 // shorter (not larger, that makes it look "slow"). | 183 // shorter (not larger, that makes it look "slow"). |
182 ui::SlideAnimation size_animation_; | 184 ui::SlideAnimation size_animation_; |
183 gfx::Rect start_bounds_; | 185 gfx::Rect start_bounds_; |
184 gfx::Rect target_bounds_; | 186 gfx::Rect target_bounds_; |
185 | 187 |
186 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 188 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
187 }; | 189 }; |
188 | 190 |
189 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 191 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
OLD | NEW |