Chromium Code Reviews| 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..9e395cb01266d55eb137b2707c75f3e61604a0f0 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 |
| @@ -30,16 +30,10 @@ |
| namespace { |
| ui::NativeTheme* GetNativeThemeForWindow(aura::Window* window) { |
|
sky
2017/02/16 22:10:32
How is the window that is passed here obtained?
Tom (Use chromium acct)
2017/02/17 00:35:31
it's obtained from Widget
https://cs.chromium.org/
sky
2017/02/17 17:02:37
Perfect!
|
| - 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) { |
| + if (window) { |
| profile = reinterpret_cast<Profile*>( |
| - window->GetNativeWindowProperty(Profile::kProfileKey)); |
| + window->GetNativeWindowProperty(BrowserView::kThemeProfileKey)); |
| } |
| // If using the system (GTK) theme, don't use an Aura NativeTheme at all. |