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

Side by Side Diff: chrome/browser/ui/views/hung_renderer_view.cc

Issue 5154009: Cleanup AdjustStringForLocaleDirection() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: further fixes Created 10 years, 1 month 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 | Annotate | Revision Log
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/hung_renderer_dialog.h" 5 #include "chrome/browser/hung_renderer_dialog.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "app/resource_bundle.h" 8 #include "app/resource_bundle.h"
9 #include "base/i18n/rtl.h" 9 #include "base/i18n/rtl.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 } 90 }
91 91
92 std::wstring HungPagesTableModel::GetText(int row, int column_id) { 92 std::wstring HungPagesTableModel::GetText(int row, int column_id) {
93 DCHECK(row >= 0 && row < RowCount()); 93 DCHECK(row >= 0 && row < RowCount());
94 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle()); 94 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle());
95 if (title.empty()) 95 if (title.empty())
96 title = UTF16ToWideHack(TabContents::GetDefaultTitle()); 96 title = UTF16ToWideHack(TabContents::GetDefaultTitle());
97 // TODO(xji): Consider adding a special case if the title text is a URL, 97 // TODO(xji): Consider adding a special case if the title text is a URL,
98 // since those should always have LTR directionality. Please refer to 98 // since those should always have LTR directionality. Please refer to
99 // http://crbug.com/6726 for more information. 99 // http://crbug.com/6726 for more information.
100 base::i18n::AdjustStringForLocaleDirection(title, &title); 100 base::i18n::AdjustStringForLocaleDirection(&title);
101 return title; 101 return title;
102 } 102 }
103 103
104 SkBitmap HungPagesTableModel::GetIcon(int row) { 104 SkBitmap HungPagesTableModel::GetIcon(int row) {
105 DCHECK(row >= 0 && row < RowCount()); 105 DCHECK(row >= 0 && row < RowCount());
106 return tab_contentses_.at(row)->GetFavIcon(); 106 return tab_contentses_.at(row)->GetFavIcon();
107 } 107 }
108 108
109 void HungPagesTableModel::SetObserver(TableModelObserver* observer) { 109 void HungPagesTableModel::SetObserver(TableModelObserver* observer) {
110 observer_ = observer; 110 observer_ = observer;
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 } 455 }
456 456
457 // static 457 // static
458 void HideForTabContents(TabContents* contents) { 458 void HideForTabContents(TabContents* contents) {
459 if (!logging::DialogsAreSuppressed() && g_instance) 459 if (!logging::DialogsAreSuppressed() && g_instance)
460 g_instance->EndForTabContents(contents); 460 g_instance->EndForTabContents(contents);
461 } 461 }
462 462
463 } // namespace hung_renderer_dialog 463 } // namespace hung_renderer_dialog
464 464
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698