| 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" |
| (...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 scale_factor(ui::SCALE_FACTOR_NONE) { | 352 scale_factor(ui::SCALE_FACTOR_NONE) { |
| 353 } | 353 } |
| 354 | 354 |
| 355 Tab::ImageCacheEntry::~ImageCacheEntry() {} | 355 Tab::ImageCacheEntry::~ImageCacheEntry() {} |
| 356 | 356 |
| 357 //////////////////////////////////////////////////////////////////////////////// | 357 //////////////////////////////////////////////////////////////////////////////// |
| 358 // Tab, statics: | 358 // Tab, statics: |
| 359 | 359 |
| 360 // static | 360 // static |
| 361 const char Tab::kViewClassName[] = "Tab"; | 361 const char Tab::kViewClassName[] = "Tab"; |
| 362 | |
| 363 // static | |
| 364 Tab::TabImage Tab::tab_alpha_ = {0}; | |
| 365 Tab::TabImage Tab::tab_active_ = {0}; | 362 Tab::TabImage Tab::tab_active_ = {0}; |
| 366 Tab::TabImage Tab::tab_inactive_ = {0}; | 363 Tab::TabImage Tab::tab_inactive_ = {0}; |
| 367 // static | 364 Tab::TabImage Tab::tab_alpha_ = {0}; |
| 368 Tab::ImageCache* Tab::image_cache_ = NULL; | 365 Tab::ImageCache* Tab::image_cache_ = NULL; |
| 369 | 366 |
| 370 //////////////////////////////////////////////////////////////////////////////// | 367 //////////////////////////////////////////////////////////////////////////////// |
| 371 // Tab, public: | 368 // Tab, public: |
| 372 | 369 |
| 373 Tab::Tab(TabController* controller) | 370 Tab::Tab(TabController* controller) |
| 374 : controller_(controller), | 371 : controller_(controller), |
| 375 closing_(false), | 372 closing_(false), |
| 376 dragging_(false), | 373 dragging_(false), |
| 377 favicon_hiding_offset_(0), | 374 favicon_hiding_offset_(0), |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1616 const gfx::ImageSkia& image) { | 1613 const gfx::ImageSkia& image) { |
| 1617 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); | 1614 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); |
| 1618 ImageCacheEntry entry; | 1615 ImageCacheEntry entry; |
| 1619 entry.resource_id = resource_id; | 1616 entry.resource_id = resource_id; |
| 1620 entry.scale_factor = scale_factor; | 1617 entry.scale_factor = scale_factor; |
| 1621 entry.image = image; | 1618 entry.image = image; |
| 1622 image_cache_->push_front(entry); | 1619 image_cache_->push_front(entry); |
| 1623 if (image_cache_->size() > kMaxImageCacheSize) | 1620 if (image_cache_->size() > kMaxImageCacheSize) |
| 1624 image_cache_->pop_back(); | 1621 image_cache_->pop_back(); |
| 1625 } | 1622 } |
| OLD | NEW |