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

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

Issue 10831308: Revert 151036 - Speculative revert to see if this change introduced a performance regression on Mac… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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
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/sad_tab_view.h" 5 #include "chrome/browser/ui/views/sad_tab_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 DCHECK(web_contents_); 115 DCHECK(web_contents_);
116 if (source == help_link_) { 116 if (source == help_link_) {
117 GURL help_url((kind_ == chrome::SAD_TAB_KIND_CRASHED) ? 117 GURL help_url((kind_ == chrome::SAD_TAB_KIND_CRASHED) ?
118 chrome::kCrashReasonURL : chrome::kKillReasonURL); 118 chrome::kCrashReasonURL : chrome::kKillReasonURL);
119 OpenURLParams params( 119 OpenURLParams params(
120 help_url, content::Referrer(), CURRENT_TAB, 120 help_url, content::Referrer(), CURRENT_TAB,
121 content::PAGE_TRANSITION_LINK, false); 121 content::PAGE_TRANSITION_LINK, false);
122 web_contents_->OpenURL(params); 122 web_contents_->OpenURL(params);
123 } else if (source == feedback_link_) { 123 } else if (source == feedback_link_) {
124 chrome::ShowFeedbackPage( 124 chrome::ShowFeedbackPage(
125 browser::FindBrowserForController(&web_contents_->GetController(), 125 browser::FindBrowserWithWebContents(web_contents_),
126 NULL),
127 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE), 126 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE),
128 std::string(kCategoryTagCrash)); 127 std::string(kCategoryTagCrash));
129 } 128 }
130 } 129 }
131 130
132 void SadTabView::ButtonPressed(views::Button* source, 131 void SadTabView::ButtonPressed(views::Button* source,
133 const ui::Event& event) { 132 const ui::Event& event) {
134 DCHECK(web_contents_); 133 DCHECK(web_contents_);
135 DCHECK(source == reload_button_); 134 DCHECK(source == reload_button_);
136 web_contents_->GetController().Reload(true); 135 web_contents_->GetController().Reload(true);
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 } 263 }
265 264
266 views::Link* SadTabView::CreateLink(const string16& text) { 265 views::Link* SadTabView::CreateLink(const string16& text) {
267 views::Link* link = new views::Link(text); 266 views::Link* link = new views::Link(text);
268 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); 267 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta));
269 link->SetBackgroundColor(background()->get_color()); 268 link->SetBackgroundColor(background()->get_color());
270 link->SetEnabledColor(kTextColor); 269 link->SetEnabledColor(kTextColor);
271 link->set_listener(this); 270 link->set_listener(this);
272 return link; 271 return link;
273 } 272 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/location_bar/location_bar_view.cc ('k') | chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698