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

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

Issue 39022: Convert NavigationEntry title to string16. TabContents::GetTitle no longer ne... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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/bug_report_view.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/hung_renderer_view.h" 5 #include "chrome/browser/views/hung_renderer_view.h"
6 6
7 #include "chrome/browser/browser_list.h" 7 #include "chrome/browser/browser_list.h"
8 #include "chrome/browser/renderer_host/render_process_host.h" 8 #include "chrome/browser/renderer_host/render_process_host.h"
9 #include "chrome/browser/renderer_host/render_view_host.h" 9 #include "chrome/browser/renderer_host/render_view_host.h"
10 #include "chrome/browser/views/standard_layout.h" 10 #include "chrome/browser/views/standard_layout.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 /////////////////////////////////////////////////////////////////////////////// 76 ///////////////////////////////////////////////////////////////////////////////
77 // HungPagesTableModel, views::GroupTableModel implementation: 77 // HungPagesTableModel, views::GroupTableModel implementation:
78 78
79 int HungPagesTableModel::RowCount() { 79 int HungPagesTableModel::RowCount() {
80 return static_cast<int>(webcontentses_.size()); 80 return static_cast<int>(webcontentses_.size());
81 } 81 }
82 82
83 std::wstring HungPagesTableModel::GetText(int row, int column_id) { 83 std::wstring HungPagesTableModel::GetText(int row, int column_id) {
84 DCHECK(row >= 0 && row < RowCount()); 84 DCHECK(row >= 0 && row < RowCount());
85 std::wstring title = webcontentses_.at(row)->GetTitle(); 85 std::wstring title = UTF16ToWideHack(webcontentses_.at(row)->GetTitle());
86 if (title.empty()) 86 if (title.empty())
87 title = l10n_util::GetString(IDS_TAB_UNTITLED_TITLE); 87 title = l10n_util::GetString(IDS_TAB_UNTITLED_TITLE);
88 // TODO(xji): Consider adding a special case if the title text is a URL, 88 // TODO(xji): Consider adding a special case if the title text is a URL,
89 // since those should always have LTR directionality. Please refer to 89 // since those should always have LTR directionality. Please refer to
90 // http://crbug.com/6726 for more information. 90 // http://crbug.com/6726 for more information.
91 l10n_util::AdjustStringForLocaleDirection(title, &title); 91 l10n_util::AdjustStringForLocaleDirection(title, &title);
92 return title; 92 return title;
93 } 93 }
94 94
95 SkBitmap HungPagesTableModel::GetIcon(int row) { 95 SkBitmap HungPagesTableModel::GetIcon(int row) {
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 instance_ = CreateHungRendererWarningView(); 442 instance_ = CreateHungRendererWarningView();
443 instance_->ShowForWebContents(contents); 443 instance_->ShowForWebContents(contents);
444 } 444 }
445 } 445 }
446 446
447 // static 447 // static
448 void HungRendererWarning::HideForWebContents(WebContents* contents) { 448 void HungRendererWarning::HideForWebContents(WebContents* contents) {
449 if (!logging::DialogsAreSuppressed() && instance_) 449 if (!logging::DialogsAreSuppressed() && instance_)
450 instance_->EndForWebContents(contents); 450 instance_->EndForWebContents(contents);
451 } 451 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bug_report_view.cc ('k') | chrome/browser/views/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698