| 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/views/view.h" | 19 #include "ui/views/view.h" |
| 19 #include "ui/views/view_targeter_delegate.h" | 20 #include "ui/views/view_targeter_delegate.h" |
| 20 | 21 |
| 21 struct AutocompleteMatch; | 22 struct AutocompleteMatch; |
| 22 class LocationBarView; | 23 class LocationBarView; |
| 23 class OmniboxEditModel; | 24 class OmniboxEditModel; |
| 24 class OmniboxResultView; | 25 class OmniboxResultView; |
| 25 class OmniboxView; | 26 class OmniboxView; |
| 26 class Profile; | 27 class Profile; |
| 27 | 28 |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 152 |
| 152 // The popup sizes vertically using an animation when the popup is getting | 153 // The popup sizes vertically using an animation when the popup is getting |
| 153 // shorter (not larger, that makes it look "slow"). | 154 // shorter (not larger, that makes it look "slow"). |
| 154 gfx::SlideAnimation size_animation_; | 155 gfx::SlideAnimation size_animation_; |
| 155 gfx::Rect start_bounds_; | 156 gfx::Rect start_bounds_; |
| 156 gfx::Rect target_bounds_; | 157 gfx::Rect target_bounds_; |
| 157 | 158 |
| 158 int start_margin_; | 159 int start_margin_; |
| 159 int end_margin_; | 160 int end_margin_; |
| 160 | 161 |
| 161 // These pointers are owned by the resource bundle. | |
| 162 const gfx::ImageSkia* top_shadow_ = nullptr; | |
| 163 const gfx::ImageSkia* bottom_shadow_ = nullptr; | |
| 164 | |
| 165 // When the dropdown is not wide enough while displaying postfix suggestions, | 162 // When the dropdown is not wide enough while displaying postfix suggestions, |
| 166 // we use the width of widest match contents to shift the suggestions so that | 163 // we use the width of widest match contents to shift the suggestions so that |
| 167 // the widest suggestion just reaches the end edge. | 164 // the widest suggestion just reaches the end edge. |
| 168 int max_match_contents_width_; | 165 int max_match_contents_width_; |
| 169 | 166 |
| 170 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); | 167 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); |
| 171 }; | 168 }; |
| 172 | 169 |
| 173 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ | 170 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ |
| OLD | NEW |