| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 1491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1502 canvas->DrawImageInt(favicon, 0, 0, bounds.width(), bounds.height(), | 1502 canvas->DrawImageInt(favicon, 0, 0, bounds.width(), bounds.height(), |
| 1503 bounds.x(), bounds.y(), bounds.width(), | 1503 bounds.x(), bounds.y(), bounds.width(), |
| 1504 bounds.height(), false); | 1504 bounds.height(), false); |
| 1505 } | 1505 } |
| 1506 } | 1506 } |
| 1507 } | 1507 } |
| 1508 | 1508 |
| 1509 void Tab::AdvanceLoadingAnimation() { | 1509 void Tab::AdvanceLoadingAnimation() { |
| 1510 const TabRendererData::NetworkState state = data().network_state; | 1510 const TabRendererData::NetworkState state = data().network_state; |
| 1511 if (controller_->IsImmersiveStyle()) { | 1511 if (controller_->IsImmersiveStyle()) { |
| 1512 throbber_->SetVisible(false); |
| 1512 if (state == TabRendererData::NETWORK_STATE_WAITING) { | 1513 if (state == TabRendererData::NETWORK_STATE_WAITING) { |
| 1513 // Waiting steps backwards. | 1514 // Waiting steps backwards. |
| 1514 immersive_loading_step_ = | 1515 immersive_loading_step_ = |
| 1515 (immersive_loading_step_ - 1 + kImmersiveLoadingStepCount) % | 1516 (immersive_loading_step_ - 1 + kImmersiveLoadingStepCount) % |
| 1516 kImmersiveLoadingStepCount; | 1517 kImmersiveLoadingStepCount; |
| 1517 } else if (state == TabRendererData::NETWORK_STATE_LOADING) { | 1518 } else if (state == TabRendererData::NETWORK_STATE_LOADING) { |
| 1518 immersive_loading_step_ = | 1519 immersive_loading_step_ = |
| 1519 (immersive_loading_step_ + 1) % kImmersiveLoadingStepCount; | 1520 (immersive_loading_step_ + 1) % kImmersiveLoadingStepCount; |
| 1520 } else { | 1521 } else { |
| 1521 immersive_loading_step_ = 0; | 1522 immersive_loading_step_ = 0; |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1760 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); | 1761 inactive_images_.image_c = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_CENTER); |
| 1761 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); | 1762 inactive_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_INACTIVE_RIGHT); |
| 1762 inactive_images_.l_width = inactive_images_.image_l->width(); | 1763 inactive_images_.l_width = inactive_images_.image_l->width(); |
| 1763 inactive_images_.r_width = inactive_images_.image_r->width(); | 1764 inactive_images_.r_width = inactive_images_.image_r->width(); |
| 1764 | 1765 |
| 1765 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); | 1766 mask_images_.image_l = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_LEFT); |
| 1766 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); | 1767 mask_images_.image_r = rb.GetImageSkiaNamed(IDR_TAB_ALPHA_RIGHT); |
| 1767 mask_images_.l_width = mask_images_.image_l->width(); | 1768 mask_images_.l_width = mask_images_.image_l->width(); |
| 1768 mask_images_.r_width = mask_images_.image_r->width(); | 1769 mask_images_.r_width = mask_images_.image_r->width(); |
| 1769 } | 1770 } |
| OLD | NEW |