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

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

Issue 349033010: Implement accessible states and notifications for the tab strip. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nvda_load_fix_3
Patch Set: Fix compile on other platforms Created 6 years, 5 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 <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 958 matching lines...) Expand 10 before | Expand all | Expand 10 after
969 969
970 default: 970 default:
971 break; 971 break;
972 } 972 }
973 event->SetHandled(); 973 event->SetHandled();
974 } 974 }
975 975
976 void Tab::GetAccessibleState(ui::AXViewState* state) { 976 void Tab::GetAccessibleState(ui::AXViewState* state) {
977 state->role = ui::AX_ROLE_TAB; 977 state->role = ui::AX_ROLE_TAB;
978 state->name = data_.title; 978 state->name = data_.title;
979 state->AddStateFlag(ui::AX_STATE_MULTISELECTABLE);
980 state->AddStateFlag(ui::AX_STATE_SELECTABLE);
981 if (IsSelected())
982 state->AddStateFlag(ui::AX_STATE_SELECTED);
979 } 983 }
980 984
981 //////////////////////////////////////////////////////////////////////////////// 985 ////////////////////////////////////////////////////////////////////////////////
982 // Tab, private 986 // Tab, private
983 987
984 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const { 988 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const {
985 if (!data().mini || width() >= kMiniTabRendererAsNormalTabWidth) 989 if (!data().mini || width() >= kMiniTabRendererAsNormalTabWidth)
986 return; 990 return;
987 const int mini_delta = kMiniTabRendererAsNormalTabWidth - GetMiniWidth(); 991 const int mini_delta = kMiniTabRendererAsNormalTabWidth - GetMiniWidth();
988 const int ideal_delta = width() - GetMiniWidth(); 992 const int ideal_delta = width() - GetMiniWidth();
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 const gfx::ImageSkia& image) { 1619 const gfx::ImageSkia& image) {
1616 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); 1620 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE);
1617 ImageCacheEntry entry; 1621 ImageCacheEntry entry;
1618 entry.resource_id = resource_id; 1622 entry.resource_id = resource_id;
1619 entry.scale_factor = scale_factor; 1623 entry.scale_factor = scale_factor;
1620 entry.image = image; 1624 entry.image = image;
1621 image_cache_->push_front(entry); 1625 image_cache_->push_front(entry);
1622 if (image_cache_->size() > kMaxImageCacheSize) 1626 if (image_cache_->size() > kMaxImageCacheSize)
1623 image_cache_->pop_back(); 1627 image_cache_->pop_back();
1624 } 1628 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/accessibility/accessibility_event_router_views.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