Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: chrome/browser/ui/views/tabs/tab.cc

Issue 1775933004: [merge-m49] CrOS: Don't paint tab-loading spinners in layers while in immersive fullscreen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2623
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 canvas->DrawImageInt(favicon, 0, 0, bounds.width(), bounds.height(), 1472 canvas->DrawImageInt(favicon, 0, 0, bounds.width(), bounds.height(),
1473 bounds.x(), bounds.y(), bounds.width(), 1473 bounds.x(), bounds.y(), bounds.width(),
1474 bounds.height(), false); 1474 bounds.height(), false);
1475 } 1475 }
1476 } 1476 }
1477 } 1477 }
1478 1478
1479 void Tab::AdvanceLoadingAnimation() { 1479 void Tab::AdvanceLoadingAnimation() {
1480 const TabRendererData::NetworkState state = data().network_state; 1480 const TabRendererData::NetworkState state = data().network_state;
1481 if (controller_->IsImmersiveStyle()) { 1481 if (controller_->IsImmersiveStyle()) {
1482 throbber_->SetVisible(false);
1482 if (state == TabRendererData::NETWORK_STATE_WAITING) { 1483 if (state == TabRendererData::NETWORK_STATE_WAITING) {
1483 // Waiting steps backwards. 1484 // Waiting steps backwards.
1484 immersive_loading_step_ = 1485 immersive_loading_step_ =
1485 (immersive_loading_step_ - 1 + kImmersiveLoadingStepCount) % 1486 (immersive_loading_step_ - 1 + kImmersiveLoadingStepCount) %
1486 kImmersiveLoadingStepCount; 1487 kImmersiveLoadingStepCount;
1487 } else if (state == TabRendererData::NETWORK_STATE_LOADING) { 1488 } else if (state == TabRendererData::NETWORK_STATE_LOADING) {
1488 immersive_loading_step_ = 1489 immersive_loading_step_ =
1489 (immersive_loading_step_ + 1) % kImmersiveLoadingStepCount; 1490 (immersive_loading_step_ + 1) % kImmersiveLoadingStepCount;
1490 } else { 1491 } else {
1491 immersive_loading_step_ = 0; 1492 immersive_loading_step_ = 0;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1759 const gfx::ImageSkia& image) { 1760 const gfx::ImageSkia& image) {
1760 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); 1761 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE);
1761 ImageCacheEntry entry; 1762 ImageCacheEntry entry;
1762 entry.resource_id = resource_id; 1763 entry.resource_id = resource_id;
1763 entry.scale_factor = scale_factor; 1764 entry.scale_factor = scale_factor;
1764 entry.image = image; 1765 entry.image = image;
1765 image_cache_->push_front(entry); 1766 image_cache_->push_front(entry);
1766 if (image_cache_->size() > kMaxImageCacheSize) 1767 if (image_cache_->size() > kMaxImageCacheSize)
1767 image_cache_->pop_back(); 1768 image_cache_->pop_back();
1768 } 1769 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/immersive_mode_controller_ash_unittest.cc ('k') | chrome/browser/ui/views/tabs/tab_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698