Index: chrome/browser/ui/views/frame/browser_view.cc |
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
index 1271b2f8257f0d7da074009cf22c9d684f4f2826..ea16798bf67d58a93067502c5e01460a606b008b 100644 |
--- a/chrome/browser/ui/views/frame/browser_view.cc |
+++ b/chrome/browser/ui/views/frame/browser_view.cc |
@@ -133,8 +133,10 @@ |
#include "ui/gfx/canvas.h" |
#include "ui/gfx/color_utils.h" |
#include "ui/gfx/geometry/rect_conversions.h" |
+#include "ui/gfx/paint_vector_icon.h" |
#include "ui/gfx/scoped_canvas.h" |
#include "ui/gfx/screen.h" |
+#include "ui/gfx/vector_icons_public.h" |
#include "ui/strings/grit/ui_strings.h" |
#include "ui/views/controls/button/menu_button.h" |
#include "ui/views/controls/textfield/textfield.h" |
@@ -156,6 +158,7 @@ |
#if defined(OS_WIN) |
#include "base/win/windows_version.h" |
#include "chrome/browser/jumplist_win.h" |
+#include "ui/gfx/color_palette.h" |
#include "ui/views/win/scoped_fullscreen_visibility.h" |
#endif |
@@ -681,7 +684,19 @@ WebContents* BrowserView::GetActiveWebContents() const { |
} |
gfx::ImageSkia BrowserView::GetOTRAvatarIcon() const { |
- return *GetThemeProvider()->GetImageSkiaNamed(IDR_OTR_ICON); |
+ if (ui::MaterialDesignController::IsModeMaterial()) { |
+ SkColor icon_color = SK_ColorWHITE; |
+#if defined(OS_WIN) |
+ // On Windows 10, we can't change the frame color so must assume it's white. |
+ if (base::win::GetVersion() == base::win::VERSION_WIN10) |
+ icon_color = gfx::kChromeIconGrey; |
+#endif |
+ return gfx::CreateVectorIcon(gfx::VectorIconId::INCOGNITO, 24, icon_color); |
+ } |
+ |
+ // GetThemeProvider() can return null if this view is not yet part of the |
+ // widget hierarchy, but the frame's theme provider is always valid. |
+ return *frame_->GetThemeProvider()->GetImageSkiaNamed(IDR_OTR_ICON); |
Evan Stade
2015/11/18 23:06:56
slight change here from previous patchsets, please
Peter Kasting
2015/11/18 23:21:56
Wouldn't this have been a bug with the existing co
Evan Stade
2015/11/18 23:49:11
BrowserView::GetOTRAvatarIcon is now called in mor
|
} |
/////////////////////////////////////////////////////////////////////////////// |