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

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

Powered by Google App Engine
This is Rietveld 408576698