| 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1003 | 1003 |
| 1004 default: | 1004 default: |
| 1005 break; | 1005 break; |
| 1006 } | 1006 } |
| 1007 event->SetHandled(); | 1007 event->SetHandled(); |
| 1008 } | 1008 } |
| 1009 | 1009 |
| 1010 void Tab::GetAccessibleState(ui::AXViewState* state) { | 1010 void Tab::GetAccessibleState(ui::AXViewState* state) { |
| 1011 state->role = ui::AX_ROLE_TAB; | 1011 state->role = ui::AX_ROLE_TAB; |
| 1012 state->name = data_.title; | 1012 state->name = data_.title; |
| 1013 state->count = controller_->tab_count(); |
| 1014 state->index = controller_->GetModelIndexOfTab(this); |
| 1013 state->AddStateFlag(ui::AX_STATE_MULTISELECTABLE); | 1015 state->AddStateFlag(ui::AX_STATE_MULTISELECTABLE); |
| 1014 state->AddStateFlag(ui::AX_STATE_SELECTABLE); | 1016 state->AddStateFlag(ui::AX_STATE_SELECTABLE); |
| 1015 if (IsSelected()) | 1017 if (IsSelected()) |
| 1016 state->AddStateFlag(ui::AX_STATE_SELECTED); | 1018 state->AddStateFlag(ui::AX_STATE_SELECTED); |
| 1017 } | 1019 } |
| 1018 | 1020 |
| 1019 //////////////////////////////////////////////////////////////////////////////// | 1021 //////////////////////////////////////////////////////////////////////////////// |
| 1020 // Tab, private | 1022 // Tab, private |
| 1021 | 1023 |
| 1022 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const { | 1024 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const { |
| (...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 const gfx::ImageSkia& image) { | 1651 const gfx::ImageSkia& image) { |
| 1650 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); | 1652 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); |
| 1651 ImageCacheEntry entry; | 1653 ImageCacheEntry entry; |
| 1652 entry.resource_id = resource_id; | 1654 entry.resource_id = resource_id; |
| 1653 entry.scale_factor = scale_factor; | 1655 entry.scale_factor = scale_factor; |
| 1654 entry.image = image; | 1656 entry.image = image; |
| 1655 image_cache_->push_front(entry); | 1657 image_cache_->push_front(entry); |
| 1656 if (image_cache_->size() > kMaxImageCacheSize) | 1658 if (image_cache_->size() > kMaxImageCacheSize) |
| 1657 image_cache_->pop_back(); | 1659 image_cache_->pop_back(); |
| 1658 } | 1660 } |
| OLD | NEW |