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

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

Issue 1073005: Move RTL related functions from app/l10n_util to base/i18n/rtl... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/go_button.cc ('k') | chrome/browser/views/location_bar_view.cc » ('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/hung_renderer_dialog.h" 5 #include "chrome/browser/hung_renderer_dialog.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/l10n_util.h" 8 #include "app/l10n_util.h"
9 #include "app/resource_bundle.h" 9 #include "app/resource_bundle.h"
10 #include "base/i18n/rtl.h"
10 #include "chrome/browser/browser_list.h" 11 #include "chrome/browser/browser_list.h"
11 #include "chrome/browser/renderer_host/render_process_host.h" 12 #include "chrome/browser/renderer_host/render_process_host.h"
12 #include "chrome/browser/renderer_host/render_view_host.h" 13 #include "chrome/browser/renderer_host/render_view_host.h"
13 #include "chrome/browser/tab_contents/tab_contents.h" 14 #include "chrome/browser/tab_contents/tab_contents.h"
14 #include "chrome/common/chrome_constants.h" 15 #include "chrome/common/chrome_constants.h"
15 #include "chrome/common/logging_chrome.h" 16 #include "chrome/common/logging_chrome.h"
16 #include "chrome/common/result_codes.h" 17 #include "chrome/common/result_codes.h"
17 #include "grit/chromium_strings.h" 18 #include "grit/chromium_strings.h"
18 #include "grit/generated_resources.h" 19 #include "grit/generated_resources.h"
19 #include "grit/theme_resources.h" 20 #include "grit/theme_resources.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 } 89 }
89 90
90 std::wstring HungPagesTableModel::GetText(int row, int column_id) { 91 std::wstring HungPagesTableModel::GetText(int row, int column_id) {
91 DCHECK(row >= 0 && row < RowCount()); 92 DCHECK(row >= 0 && row < RowCount());
92 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle()); 93 std::wstring title = UTF16ToWideHack(tab_contentses_[row]->GetTitle());
93 if (title.empty()) 94 if (title.empty())
94 title = UTF16ToWideHack(TabContents::GetDefaultTitle()); 95 title = UTF16ToWideHack(TabContents::GetDefaultTitle());
95 // TODO(xji): Consider adding a special case if the title text is a URL, 96 // TODO(xji): Consider adding a special case if the title text is a URL,
96 // since those should always have LTR directionality. Please refer to 97 // since those should always have LTR directionality. Please refer to
97 // http://crbug.com/6726 for more information. 98 // http://crbug.com/6726 for more information.
98 l10n_util::AdjustStringForLocaleDirection(title, &title); 99 base::i18n::AdjustStringForLocaleDirection(title, &title);
99 return title; 100 return title;
100 } 101 }
101 102
102 SkBitmap HungPagesTableModel::GetIcon(int row) { 103 SkBitmap HungPagesTableModel::GetIcon(int row) {
103 DCHECK(row >= 0 && row < RowCount()); 104 DCHECK(row >= 0 && row < RowCount());
104 return tab_contentses_.at(row)->GetFavIcon(); 105 return tab_contentses_.at(row)->GetFavIcon();
105 } 106 }
106 107
107 void HungPagesTableModel::SetObserver(TableModelObserver* observer) { 108 void HungPagesTableModel::SetObserver(TableModelObserver* observer) {
108 observer_ = observer; 109 observer_ = observer;
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 } 452 }
452 453
453 // static 454 // static
454 void HideForTabContents(TabContents* contents) { 455 void HideForTabContents(TabContents* contents) {
455 if (!logging::DialogsAreSuppressed() && g_instance) 456 if (!logging::DialogsAreSuppressed() && g_instance)
456 g_instance->EndForTabContents(contents); 457 g_instance->EndForTabContents(contents);
457 } 458 }
458 459
459 } // namespace hung_renderer_dialog 460 } // namespace hung_renderer_dialog
460 461
OLDNEW
« no previous file with comments | « chrome/browser/views/go_button.cc ('k') | chrome/browser/views/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698