| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/views/tab_icon_view.h" | 5 #include "chrome/browser/ui/views/tab_icon_view.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| 11 #include <shellapi.h> | 11 #include <shellapi.h> |
| 12 #endif | 12 #endif |
| 13 | 13 |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 16 #include "chrome/app/chrome_command_ids.h" | 16 #include "chrome/app/chrome_command_ids.h" |
| 17 #include "chrome/browser/ui/views/tab_icon_view_model.h" | 17 #include "chrome/browser/ui/views/tab_icon_view_model.h" |
| 18 #include "grit/theme_resources.h" | 18 #include "grit/theme_resources.h" |
| 19 #include "ui/base/resource/resource_bundle.h" | 19 #include "ui/base/resource/resource_bundle.h" |
| 20 #include "ui/base/theme_provider.h" | 20 #include "ui/base/theme_provider.h" |
| 21 #include "ui/gfx/canvas.h" | 21 #include "ui/gfx/canvas.h" |
| 22 #include "ui/gfx/favicon_size.h" | 22 #include "ui/gfx/favicon_size.h" |
| 23 #include "ui/gfx/paint_throbber.h" | 23 #include "ui/gfx/paint_throbber.h" |
| 24 #include "ui/native_theme/native_theme.h" | 24 #include "ui/native_theme/native_theme.h" |
| 25 #include "ui/resources/grit/ui_resources.h" | 25 #include "ui/resources/grit/ui_resources.h" |
| 26 | 26 |
| 27 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
| 28 #include "chrome/browser/app_icon_win.h" | 28 #include "chrome/browser/win/app_icon.h" |
| 29 #include "ui/gfx/icon_util.h" | 29 #include "ui/gfx/icon_util.h" |
| 30 #endif | 30 #endif |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 bool g_initialized = false; | 34 bool g_initialized = false; |
| 35 gfx::ImageSkia* g_default_favicon = nullptr; | 35 gfx::ImageSkia* g_default_favicon = nullptr; |
| 36 | 36 |
| 37 } // namespace | 37 } // namespace |
| 38 | 38 |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView(); | 132 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView(); |
| 133 if (!favicon.isNull()) { | 133 if (!favicon.isNull()) { |
| 134 rendered = true; | 134 rendered = true; |
| 135 PaintFavicon(canvas, favicon); | 135 PaintFavicon(canvas, favicon); |
| 136 } | 136 } |
| 137 } | 137 } |
| 138 | 138 |
| 139 if (!rendered) | 139 if (!rendered) |
| 140 PaintFavicon(canvas, *g_default_favicon); | 140 PaintFavicon(canvas, *g_default_favicon); |
| 141 } | 141 } |
| OLD | NEW |