Index: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
index c97ddb9beae5b0be99137747c4f51d72a7dcaffd..9a0a3cce041f02e0681d2250cf16a04c619ec0f5 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc |
@@ -31,10 +31,18 @@ class OmniboxPopupContentsView::AutocompletePopupWidget |
: public views::Widget, |
public base::SupportsWeakPtr<AutocompletePopupWidget> { |
public: |
- AutocompletePopupWidget() {} |
+ explicit AutocompletePopupWidget(views::Widget* popup_parent) |
+ : popup_parent_(popup_parent) {} |
~AutocompletePopupWidget() override {} |
+ const ui::NativeTheme* GetNativeTheme() const override { |
+ return popup_parent_->GetNativeTheme(); |
+ } |
+ |
private: |
+ // The transient parent of this popup. |
+ views::Widget* popup_parent_; |
Peter Kasting
2015/11/14 02:46:08
Nit: Just call this |parent_| since "popup" is alr
Evan Stade
2015/11/16 19:36:33
this change reverted
|
+ |
DISALLOW_COPY_AND_ASSIGN(AutocompletePopupWidget); |
}; |
@@ -237,7 +245,7 @@ void OmniboxPopupContentsView::UpdatePopupAppearance() { |
views::Widget* popup_parent = location_bar_view_->GetWidget(); |
// If the popup is currently closed, we need to create it. |
- popup_ = (new AutocompletePopupWidget)->AsWeakPtr(); |
+ popup_ = (new AutocompletePopupWidget(popup_parent))->AsWeakPtr(); |
views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP); |
#if defined(OS_WIN) |