| Index: chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
| diff --git a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
| index eca7168a8f59585999f19927e095319ba5ab9e66..0aac8ac5030ddca08642e337e93811e043397f78 100644
|
| --- a/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
| +++ b/chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc
|
| @@ -12,6 +12,7 @@
|
| #include "chrome/browser/ui/browser_list.h"
|
| #include "chrome/browser/ui/libgtkui/gtk_ui.h"
|
| #include "chrome/browser/ui/views/frame/browser_view.h"
|
| +#include "chrome/browser/ui/views/theme_profile_key.h"
|
| #include "chrome/common/pref_names.h"
|
| #include "components/prefs/pref_service.h"
|
| #include "ui/aura/env.h"
|
| @@ -33,14 +34,7 @@ ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) {
|
| if (!window)
|
| return nullptr;
|
|
|
| - Profile* profile = nullptr;
|
| - // Window types not listed here (such as tooltips) will never use Chrome
|
| - // theming.
|
| - if (window->type() == ui::wm::WINDOW_TYPE_NORMAL ||
|
| - window->type() == ui::wm::WINDOW_TYPE_POPUP) {
|
| - profile = reinterpret_cast<Profile*>(
|
| - window->GetNativeWindowProperty(Profile::kProfileKey));
|
| - }
|
| + Profile* profile = GetThemeProfileForWindow(window);
|
|
|
| // If using the system (GTK) theme, don't use an Aura NativeTheme at all.
|
| // NB: ThemeService::UsingSystemTheme() might lag behind this pref. See
|
|
|