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

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

Issue 8956050: Rename TabContents::controller() to GetController and put it into the WebContents interface. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 chrome::kCrashReasonURL : 68 chrome::kCrashReasonURL :
69 chrome::kKillReasonURL)); 69 chrome::kKillReasonURL));
70 tab_contents_->OpenURL(OpenURLParams( 70 tab_contents_->OpenURL(OpenURLParams(
71 help_url, 71 help_url,
72 content::Referrer(), 72 content::Referrer(),
73 CURRENT_TAB, 73 CURRENT_TAB,
74 content::PAGE_TRANSITION_LINK, 74 content::PAGE_TRANSITION_LINK,
75 false /* is renderer initiated */)); 75 false /* is renderer initiated */));
76 } else if (source == feedback_link_) { 76 } else if (source == feedback_link_) {
77 browser::ShowHtmlBugReportView( 77 browser::ShowHtmlBugReportView(
78 Browser::GetBrowserForController(&tab_contents_->controller(), NULL), 78 Browser::GetBrowserForController(&tab_contents_->GetController(), NULL),
79 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE), 79 l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE),
80 userfeedback::ChromeOsData_ChromeOsCategory_CRASH); 80 userfeedback::ChromeOsData_ChromeOsCategory_CRASH);
81 } 81 }
82 } 82 }
83 83
84 void SadTabView::ButtonPressed(views::Button* source, 84 void SadTabView::ButtonPressed(views::Button* source,
85 const views::Event& event) { 85 const views::Event& event) {
86 DCHECK(tab_contents_); 86 DCHECK(tab_contents_);
87 DCHECK(source == reload_button_); 87 DCHECK(source == reload_button_);
88 tab_contents_->controller().Reload(true); 88 tab_contents_->GetController().Reload(true);
89 } 89 }
90 90
91 void SadTabView::Layout() { 91 void SadTabView::Layout() {
92 // Specify the maximum message width explicitly. 92 // Specify the maximum message width explicitly.
93 message_->SizeToFit(static_cast<int>(width() * kMessageSize)); 93 message_->SizeToFit(static_cast<int>(width() * kMessageSize));
94 View::Layout(); 94 View::Layout();
95 } 95 }
96 96
97 void SadTabView::ViewHierarchyChanged(bool is_add, 97 void SadTabView::ViewHierarchyChanged(bool is_add,
98 views::View* parent, 98 views::View* parent,
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 views::Link* SadTabView::CreateLink(const string16& text) { 193 views::Link* SadTabView::CreateLink(const string16& text) {
194 views::Link* link = new views::Link(text); 194 views::Link* link = new views::Link(text);
195 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta)); 195 link->SetFont(base_font_.DeriveFont(kMessageFontSizeDelta));
196 link->SetBackgroundColor(background()->get_color()); 196 link->SetBackgroundColor(background()->get_color());
197 link->SetEnabledColor(kTextColor); 197 link->SetEnabledColor(kTextColor);
198 link->set_listener(this); 198 link->set_listener(this);
199 return link; 199 return link;
200 } 200 }
201 201
202 202
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/notifications/balloon_view.cc ('k') | chrome/browser/ui/views/tab_contents/tab_contents_container.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698