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

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

Issue 8253002: Move PageTransition into content namespace. While I'm touching all these files, I've also updated... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/google/google_util.h" 9 #include "chrome/browser/google/google_util.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 } 56 }
57 57
58 SadTabView::~SadTabView() {} 58 SadTabView::~SadTabView() {}
59 59
60 void SadTabView::LinkClicked(views::Link* source, int event_flags) { 60 void SadTabView::LinkClicked(views::Link* source, int event_flags) {
61 if (tab_contents_ != NULL && source == help_link_) { 61 if (tab_contents_ != NULL && source == help_link_) {
62 GURL help_url = 62 GURL help_url =
63 google_util::AppendGoogleLocaleParam(GURL(kind_ == CRASHED ? 63 google_util::AppendGoogleLocaleParam(GURL(kind_ == CRASHED ?
64 chrome::kCrashReasonURL : 64 chrome::kCrashReasonURL :
65 chrome::kKillReasonURL)); 65 chrome::kKillReasonURL));
66 tab_contents_->OpenURL(help_url, GURL(), CURRENT_TAB, PageTransition::LINK); 66 tab_contents_->OpenURL(
67 help_url, GURL(), CURRENT_TAB, content::PAGE_TRANSITION_LINK);
67 } else if (tab_contents_ != NULL && source == feedback_link_) { 68 } else if (tab_contents_ != NULL && source == feedback_link_) {
68 browser::ShowHtmlBugReportView( 69 browser::ShowHtmlBugReportView(
69 Browser::GetBrowserForController(&tab_contents_->controller(), NULL), 70 Browser::GetBrowserForController(&tab_contents_->controller(), NULL),
70 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE), 71 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE),
71 userfeedback::ChromeOsData_ChromeOsCategory_CRASH); 72 userfeedback::ChromeOsData_ChromeOsCategory_CRASH);
72 } 73 }
73 } 74 }
74 75
75 void SadTabView::Layout() { 76 void SadTabView::Layout() {
76 // Specify the maximum message width explicitly. 77 // Specify the maximum message width explicitly.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 168 }
168 169
169 void SadTabView::OnPaint(gfx::Canvas* canvas) { 170 void SadTabView::OnPaint(gfx::Canvas* canvas) {
170 if (!painted_) { 171 if (!painted_) {
171 // User actually saw the error, keep track for user experience stats. 172 // User actually saw the error, keep track for user experience stats.
172 UMA_HISTOGRAM_COUNTS("SadTab.Displayed", kind_); 173 UMA_HISTOGRAM_COUNTS("SadTab.Displayed", kind_);
173 painted_ = true; 174 painted_ = true;
174 } 175 }
175 View::OnPaint(canvas); 176 View::OnPaint(canvas);
176 } 177 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698