| 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 | 983 |
| 984 default: | 984 default: |
| 985 break; | 985 break; |
| 986 } | 986 } |
| 987 event->SetHandled(); | 987 event->SetHandled(); |
| 988 } | 988 } |
| 989 | 989 |
| 990 void Tab::GetAccessibleNodeData(ui::AXNodeData* node_data) { | 990 void Tab::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 991 node_data->role = ui::AX_ROLE_TAB; | 991 node_data->role = ui::AX_ROLE_TAB; |
| 992 node_data->SetName(controller_->GetAccessibleTabName(this)); | 992 node_data->SetName(controller_->GetAccessibleTabName(this)); |
| 993 node_data->AddStateFlag(ui::AX_STATE_MULTISELECTABLE); | 993 node_data->AddState(ui::AX_STATE_MULTISELECTABLE); |
| 994 node_data->AddStateFlag(ui::AX_STATE_SELECTABLE); | 994 node_data->AddState(ui::AX_STATE_SELECTABLE); |
| 995 controller_->UpdateTabAccessibilityState(this, node_data); | 995 controller_->UpdateTabAccessibilityState(this, node_data); |
| 996 if (IsSelected()) | 996 if (IsSelected()) |
| 997 node_data->AddStateFlag(ui::AX_STATE_SELECTED); | 997 node_data->AddState(ui::AX_STATE_SELECTED); |
| 998 } | 998 } |
| 999 | 999 |
| 1000 //////////////////////////////////////////////////////////////////////////////// | 1000 //////////////////////////////////////////////////////////////////////////////// |
| 1001 // Tab, private | 1001 // Tab, private |
| 1002 | 1002 |
| 1003 void Tab::MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const { | 1003 void Tab::MaybeAdjustLeftForPinnedTab(gfx::Rect* bounds) const { |
| 1004 if (ShouldRenderAsNormalTab()) | 1004 if (ShouldRenderAsNormalTab()) |
| 1005 return; | 1005 return; |
| 1006 const int ideal_delta = width() - GetPinnedWidth(); | 1006 const int ideal_delta = width() - GetPinnedWidth(); |
| 1007 const int ideal_x = (GetPinnedWidth() - bounds->width()) / 2; | 1007 const int ideal_x = (GetPinnedWidth() - bounds->width()) / 2; |
| (...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1428 | 1428 |
| 1429 // Extends the area to the bottom when the crash animation is in progress. | 1429 // Extends the area to the bottom when the crash animation is in progress. |
| 1430 if (crash_icon_animation_->is_animating()) | 1430 if (crash_icon_animation_->is_animating()) |
| 1431 bounds.set_height(height() - bounds.y()); | 1431 bounds.set_height(height() - bounds.y()); |
| 1432 bounds.set_x(GetMirroredXForRect(bounds)); | 1432 bounds.set_x(GetMirroredXForRect(bounds)); |
| 1433 SchedulePaintInRect(bounds); | 1433 SchedulePaintInRect(bounds); |
| 1434 } | 1434 } |
| 1435 | 1435 |
| 1436 Tab::BackgroundCache::BackgroundCache() = default; | 1436 Tab::BackgroundCache::BackgroundCache() = default; |
| 1437 Tab::BackgroundCache::~BackgroundCache() = default; | 1437 Tab::BackgroundCache::~BackgroundCache() = default; |
| OLD | NEW |