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

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

Issue 10214001: WebDialogs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void SadTabView::LinkClicked(views::Link* source, int event_flags) { 94 void SadTabView::LinkClicked(views::Link* source, int event_flags) {
95 DCHECK(web_contents_); 95 DCHECK(web_contents_);
96 if (source == help_link_) { 96 if (source == help_link_) {
97 GURL help_url( 97 GURL help_url(
98 kind_ == CRASHED ? chrome::kCrashReasonURL : chrome::kKillReasonURL); 98 kind_ == CRASHED ? chrome::kCrashReasonURL : chrome::kKillReasonURL);
99 OpenURLParams params( 99 OpenURLParams params(
100 help_url, content::Referrer(), CURRENT_TAB, 100 help_url, content::Referrer(), CURRENT_TAB,
101 content::PAGE_TRANSITION_LINK, false); 101 content::PAGE_TRANSITION_LINK, false);
102 web_contents_->OpenURL(params); 102 web_contents_->OpenURL(params);
103 } else if (source == feedback_link_) { 103 } else if (source == feedback_link_) {
104 browser::ShowHtmlFeedbackView( 104 browser::ShowWebFeedbackView(
105 Browser::GetBrowserForController(&web_contents_->GetController(), NULL), 105 Browser::GetBrowserForController(&web_contents_->GetController(), NULL),
106 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE), 106 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE),
107 std::string(kCategoryTagCrash)); 107 std::string(kCategoryTagCrash));
108 } 108 }
109 } 109 }
110 110
111 void SadTabView::ButtonPressed(views::Button* source, 111 void SadTabView::ButtonPressed(views::Button* source,
112 const views::Event& event) { 112 const views::Event& event) {
113 DCHECK(web_contents_); 113 DCHECK(web_contents_);
114 DCHECK(source == reload_button_); 114 DCHECK(source == reload_button_);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 240 }
241 241
242 views::Link* SadTabView::CreateLink(const string16& text) { 242 views::Link* SadTabView::CreateLink(const string16& text) {
243 views::Link* link = new views::Link(text); 243 views::Link* link = new views::Link(text);
244 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); 244 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta));
245 link->SetBackgroundColor(background()->get_color()); 245 link->SetBackgroundColor(background()->get_color());
246 link->SetEnabledColor(kTextColor); 246 link->SetEnabledColor(kTextColor);
247 link->set_listener(this); 247 link->set_listener(this);
248 return link; 248 return link;
249 } 249 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/keyboard_overlay_dialog_view.cc ('k') | chrome/browser/ui/views/web_dialog_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698