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 "chrome/grit/theme_resources.h" | 18 #include "chrome/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" | |
26 | 25 |
27 #if defined(OS_WIN) | 26 #if defined(OS_WIN) |
28 #include "chrome/browser/win/app_icon.h" | 27 #include "chrome/browser/win/app_icon.h" |
29 #include "ui/gfx/icon_util.h" | 28 #include "ui/gfx/icon_util.h" |
30 #endif | 29 #endif |
31 | 30 |
32 namespace { | 31 namespace { |
33 | 32 |
34 bool g_initialized = false; | 33 bool g_initialized = false; |
35 gfx::ImageSkia* g_default_favicon = nullptr; | 34 gfx::ImageSkia* g_default_favicon = nullptr; |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView(); | 131 gfx::ImageSkia favicon = model_->GetFaviconForTabIconView(); |
133 if (!favicon.isNull()) { | 132 if (!favicon.isNull()) { |
134 rendered = true; | 133 rendered = true; |
135 PaintFavicon(canvas, favicon); | 134 PaintFavicon(canvas, favicon); |
136 } | 135 } |
137 } | 136 } |
138 | 137 |
139 if (!rendered) | 138 if (!rendered) |
140 PaintFavicon(canvas, *g_default_favicon); | 139 PaintFavicon(canvas, *g_default_favicon); |
141 } | 140 } |
OLD | NEW |