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

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

Issue 393033006: Added tab notification to accessibility_event_router_views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tab index -1 isn't read 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 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1007 break; 1007 break;
1008 } 1008 }
1009 event->SetHandled(); 1009 event->SetHandled();
1010 } 1010 }
1011 1011
1012 void Tab::GetAccessibleState(ui::AXViewState* state) { 1012 void Tab::GetAccessibleState(ui::AXViewState* state) {
1013 state->role = ui::AX_ROLE_TAB; 1013 state->role = ui::AX_ROLE_TAB;
1014 state->name = data_.title; 1014 state->name = data_.title;
1015 state->AddStateFlag(ui::AX_STATE_MULTISELECTABLE); 1015 state->AddStateFlag(ui::AX_STATE_MULTISELECTABLE);
1016 state->AddStateFlag(ui::AX_STATE_SELECTABLE); 1016 state->AddStateFlag(ui::AX_STATE_SELECTABLE);
1017 controller_->UpdateTabAccessibilityState(this, state);
1017 if (IsSelected()) 1018 if (IsSelected())
1018 state->AddStateFlag(ui::AX_STATE_SELECTED); 1019 state->AddStateFlag(ui::AX_STATE_SELECTED);
1019 } 1020 }
1020 1021
1021 //////////////////////////////////////////////////////////////////////////////// 1022 ////////////////////////////////////////////////////////////////////////////////
1022 // Tab, private 1023 // Tab, private
1023 1024
1024 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const { 1025 void Tab::MaybeAdjustLeftForMiniTab(gfx::Rect* bounds) const {
1025 if (!data().mini || width() >= kMiniTabRendererAsNormalTabWidth) 1026 if (!data().mini || width() >= kMiniTabRendererAsNormalTabWidth)
1026 return; 1027 return;
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 const gfx::ImageSkia& image) { 1652 const gfx::ImageSkia& image) {
1652 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE); 1653 DCHECK_NE(scale_factor, ui::SCALE_FACTOR_NONE);
1653 ImageCacheEntry entry; 1654 ImageCacheEntry entry;
1654 entry.resource_id = resource_id; 1655 entry.resource_id = resource_id;
1655 entry.scale_factor = scale_factor; 1656 entry.scale_factor = scale_factor;
1656 entry.image = image; 1657 entry.image = image;
1657 image_cache_->push_front(entry); 1658 image_cache_->push_front(entry);
1658 if (image_cache_->size() > kMaxImageCacheSize) 1659 if (image_cache_->size() > kMaxImageCacheSize)
1659 image_cache_->pop_back(); 1660 image_cache_->pop_back();
1660 } 1661 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698