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

Side by Side Diff: chrome/browser/views/tabs/tab_renderer.cc

Issue 1616004: Fix Regression for Accessible Names (Closed)
Patch Set: Created 10 years, 8 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
« no previous file with comments | « chrome/browser/views/tabs/tab.cc ('k') | views/controls/image_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/tabs/tab_renderer.h" 5 #include "chrome/browser/views/tabs/tab_renderer.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 if (data_.phantom != phantom || !loading_only) { 304 if (data_.phantom != phantom || !loading_only) {
305 data_.title = contents->GetTitle(); 305 data_.title = contents->GetTitle();
306 data_.off_the_record = contents->profile()->IsOffTheRecord(); 306 data_.off_the_record = contents->profile()->IsOffTheRecord();
307 data_.crashed = contents->is_crashed(); 307 data_.crashed = contents->is_crashed();
308 SkBitmap app_icon = contents->app_extension_icon(); 308 SkBitmap app_icon = contents->app_extension_icon();
309 if (!app_icon.empty()) 309 if (!app_icon.empty())
310 data_.favicon = app_icon; 310 data_.favicon = app_icon;
311 else 311 else
312 data_.favicon = contents->GetFavIcon(); 312 data_.favicon = contents->GetFavIcon();
313 data_.phantom = phantom; 313 data_.phantom = phantom;
314
315 // Sets the accessible name for the tab.
316 SetAccessibleName(data_.title);
Peter Kasting 2010/04/04 01:20:13 I don't know the tab code well enough to know if t
314 } 317 }
315 318
316 // TODO(glen): Temporary hax. 319 // TODO(glen): Temporary hax.
317 theme_provider_ = contents->profile()->GetThemeProvider(); 320 theme_provider_ = contents->profile()->GetThemeProvider();
318 321
319 // Loading state also involves whether we show the favicon, since that's where 322 // Loading state also involves whether we show the favicon, since that's where
320 // we display the throbber. 323 // we display the throbber.
321 data_.loading = contents->is_loading(); 324 data_.loading = contents->is_loading();
322 data_.show_icon = contents->ShouldDisplayFavIcon(); 325 data_.show_icon = contents->ShouldDisplayFavIcon();
323 } 326 }
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 910
908 void TabRenderer::SetBlocked(bool blocked) { 911 void TabRenderer::SetBlocked(bool blocked) {
909 if (data_.blocked == blocked) 912 if (data_.blocked == blocked)
910 return; 913 return;
911 data_.blocked = blocked; 914 data_.blocked = blocked;
912 if (blocked) 915 if (blocked)
913 StartPulse(); 916 StartPulse();
914 else 917 else
915 StopPulse(); 918 StopPulse();
916 } 919 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/tab.cc ('k') | views/controls/image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698