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" |
11 #include "base/memory/weak_ptr.h" | 11 #include "base/memory/weak_ptr.h" |
12 #include "components/omnibox/browser/omnibox_popup_model.h" | 12 #include "components/omnibox/browser/omnibox_popup_model.h" |
13 #include "components/omnibox/browser/omnibox_popup_view.h" | 13 #include "components/omnibox/browser/omnibox_popup_view.h" |
14 #include "ui/base/window_open_disposition.h" | 14 #include "ui/base/window_open_disposition.h" |
15 #include "ui/gfx/animation/animation_delegate.h" | 15 #include "ui/gfx/animation/animation_delegate.h" |
16 #include "ui/gfx/animation/slide_animation.h" | 16 #include "ui/gfx/animation/slide_animation.h" |
17 #include "ui/gfx/font_list.h" | 17 #include "ui/gfx/font_list.h" |
18 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
19 #include "ui/views/view.h" | 19 #include "ui/views/view.h" |
20 #include "ui/views/view_targeter_delegate.h" | 20 #include "ui/views/view_targeter_delegate.h" |
21 | 21 |
22 struct AutocompleteMatch; | 22 struct AutocompleteMatch; |
23 class LocationBarView; | 23 class LocationBarView; |
24 class OmniboxEditModel; | 24 class OmniboxEditModel; |
25 class OmniboxResultView; | 25 class OmniboxResultView; |
26 class OmniboxView; | 26 class OmniboxView; |
27 class Profile; | |
28 | 27 |
29 // A view representing the contents of the autocomplete popup. | 28 // A view representing the contents of the autocomplete popup. |
30 class OmniboxPopupContentsView : public views::View, | 29 class OmniboxPopupContentsView : public views::View, |
31 public OmniboxPopupView, | 30 public OmniboxPopupView, |
32 public views::ViewTargeterDelegate, | 31 public views::ViewTargeterDelegate, |
33 public gfx::AnimationDelegate { | 32 public gfx::AnimationDelegate { |
34 public: | 33 public: |
35 // Factory method for creating the AutocompletePopupView. | 34 // Factory method for creating the AutocompletePopupView. |
36 static OmniboxPopupView* Create(const gfx::FontList& font_list, | 35 static OmniboxPopupView* Create(const gfx::FontList& font_list, |
37 OmniboxView* omnibox_view, | 36 OmniboxView* omnibox_view, |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 | 160 |
162 // When the dropdown is not wide enough while displaying postfix suggestions, | 161 // When the dropdown is not wide enough while displaying postfix suggestions, |
163 // we use the width of widest match contents to shift the suggestions so that | 162 // we use the width of widest match contents to shift the suggestions so that |
164 // the widest suggestion just reaches the end edge. | 163 // the widest suggestion just reaches the end edge. |
165 int max_match_contents_width_; | 164 int max_match_contents_width_; |
166 | 165 |
167 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 166 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
168 }; | 167 }; |
169 | 168 |
170 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 169 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
OLD | NEW |