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/tabs/tab.h" | 5 #include "chrome/browser/ui/views/tabs/tab.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/debug/alias.h" | 10 #include "base/debug/alias.h" |
11 #include "base/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "chrome/browser/defaults.h" | 12 #include "chrome/browser/defaults.h" |
13 #include "chrome/browser/themes/theme_properties.h" | 13 #include "chrome/browser/themes/theme_properties.h" |
14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
16 #include "chrome/browser/ui/tabs/tab_resources.h" | 16 #include "chrome/browser/ui/tabs/tab_resources.h" |
17 #include "chrome/browser/ui/view_ids.h" | 17 #include "chrome/browser/ui/view_ids.h" |
18 #include "chrome/browser/ui/views/tabs/tab_controller.h" | 18 #include "chrome/browser/ui/views/tabs/tab_controller.h" |
19 #include "chrome/browser/ui/views/theme_image_mapper.h" | 19 #include "chrome/browser/ui/views/theme_image_mapper.h" |
20 #include "chrome/common/chrome_switches.h" | 20 #include "chrome/common/chrome_switches.h" |
21 #include "grit/generated_resources.h" | 21 #include "grit/generated_resources.h" |
(...skipping 1798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1820 const gfx::ImageSkia& image) { | 1820 const gfx::ImageSkia& image) { |
1821 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); | 1821 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); |
1822 ImageCacheEntry entry; | 1822 ImageCacheEntry entry; |
1823 entry.resource_id = resource_id; | 1823 entry.resource_id = resource_id; |
1824 entry.scale_factor = scale_factor; | 1824 entry.scale_factor = scale_factor; |
1825 entry.image = image; | 1825 entry.image = image; |
1826 image_cache_->push_front(entry); | 1826 image_cache_->push_front(entry); |
1827 if (image_cache_->size() > kMaxImageCacheSize) | 1827 if (image_cache_->size() > kMaxImageCacheSize) |
1828 image_cache_->pop_back(); | 1828 image_cache_->pop_back(); |
1829 } | 1829 } |
OLD | NEW |