Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1231)

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc

Issue 1637203002: [MD] Don't use new OTR native-theming when using a custom browser theme. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: move lifetime comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/theme_copying_widget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d38e649e16036e08c6ce55d47ec4724491fc5da3..fb229650463d7e61cb501a5a92194e3e5a0f737b 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc
@@ -13,6 +13,7 @@
#include "chrome/browser/ui/layout_constants.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
#include "chrome/browser/ui/views/omnibox/omnibox_result_view.h"
+#include "chrome/browser/ui/views/theme_copying_widget.h"
#include "components/omnibox/browser/omnibox_view.h"
#include "grit/theme_resources.h"
#include "ui/base/material_design/material_design_controller.h"
@@ -31,10 +32,11 @@
#include "ui/views/window/non_client_view.h"
class OmniboxPopupContentsView::AutocompletePopupWidget
- : public views::Widget,
+ : public ThemeCopyingWidget,
public base::SupportsWeakPtr<AutocompletePopupWidget> {
public:
- AutocompletePopupWidget() {}
+ explicit AutocompletePopupWidget(views::Widget* role_model)
+ : ThemeCopyingWidget(role_model) {}
~AutocompletePopupWidget() override {}
private:
@@ -239,7 +241,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)
@@ -252,7 +254,6 @@ void OmniboxPopupContentsView::UpdatePopupAppearance() {
params.parent = popup_parent->GetNativeView();
params.bounds = GetPopupBounds();
params.context = popup_parent->GetNativeWindow();
- params.native_theme = popup_parent->GetNativeTheme();
popup_->Init(params);
// Third-party software such as DigitalPersona identity verification can
// hook the underlying window creation methods and use SendMessage to
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/theme_copying_widget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698