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

Unified Diff: chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc

Issue 1243513002: linux_aura: Call MapThemeImage for resources missing in native theme (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 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 | « AUTHORS ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc
diff --git a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc
index f45959e13995e26a97f649a0adc2fc604f0346fb..524dd3ed1d468daa61e9465df7f7848fadb611a5 100644
--- a/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc
+++ b/chrome/browser/ui/views/frame/browser_desktop_window_tree_host_x11.cc
@@ -28,9 +28,13 @@ class DesktopThemeProvider : public ui::ThemeProvider {
return delegate_->UsingSystemTheme();
}
gfx::ImageSkia* GetImageSkiaNamed(int id) const override {
- if (delegate_->UsingSystemTheme())
- return delegate_->GetImageSkiaNamed(id);
-
+ if (delegate_->UsingSystemTheme()) {
+ if (delegate_->HasCustomImage(id))
+ return delegate_->GetImageSkiaNamed(id);
+ else
+ return delegate_->GetImageSkiaNamed(
+ chrome::MapThemeImage(chrome::HOST_DESKTOP_TYPE_NATIVE, id));
Elliot Glaysher 2015/07/17 17:06:28 nit: this return line looks duplicated. Prefer som
jclw 2015/07/21 20:11:38 Done.
+ }
return delegate_->GetImageSkiaNamed(
chrome::MapThemeImage(chrome::HOST_DESKTOP_TYPE_NATIVE, id));
}
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698