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

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: GetTabCount returns 1 in test class 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 992 matching lines...) Expand 10 before | Expand all | Expand 10 after
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_->GetTabCount();
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698