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

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

Issue 8477042: Move Sad Tab implementation out of the TabContentsViews. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: changes for jochen and jam Created 9 years, 1 month 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/browser_dialogs.h" 5 #include "chrome/browser/ui/browser_dialogs.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "chrome/browser/favicon/favicon_tab_helper.h" 10 #include "chrome/browser/favicon/favicon_tab_helper.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 83
84 TabContents* tab_contents() const { 84 TabContents* tab_contents() const {
85 return TabContentsObserver::tab_contents(); 85 return TabContentsObserver::tab_contents();
86 } 86 }
87 87
88 FaviconTabHelper* favicon_tab_helper() { 88 FaviconTabHelper* favicon_tab_helper() {
89 return tab_->favicon_tab_helper(); 89 return tab_->favicon_tab_helper();
90 } 90 }
91 91
92 // TabContentsObserver overrides: 92 // TabContentsObserver overrides:
93 virtual void RenderViewGone() OVERRIDE; 93 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
94 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE; 94 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE;
95 95
96 private: 96 private:
97 HungPagesTableModel* model_; 97 HungPagesTableModel* model_;
98 TabContentsWrapper* tab_; 98 TabContentsWrapper* tab_;
99 99
100 DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl); 100 DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
101 }; 101 };
102 102
103 // Invoked when a TabContents is destroyed. Cleans up |tab_observers_| and 103 // Invoked when a TabContents is destroyed. Cleans up |tab_observers_| and
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
206 206
207 HungPagesTableModel::TabContentsObserverImpl::TabContentsObserverImpl( 207 HungPagesTableModel::TabContentsObserverImpl::TabContentsObserverImpl(
208 HungPagesTableModel* model, 208 HungPagesTableModel* model,
209 TabContentsWrapper* tab) 209 TabContentsWrapper* tab)
210 : TabContentsObserver(tab->tab_contents()), 210 : TabContentsObserver(tab->tab_contents()),
211 model_(model), 211 model_(model),
212 tab_(tab) { 212 tab_(tab) {
213 } 213 }
214 214
215 void HungPagesTableModel::TabContentsObserverImpl::RenderViewGone() { 215 void HungPagesTableModel::TabContentsObserverImpl::RenderViewGone(
216 base::TerminationStatus status) {
216 model_->TabDestroyed(this); 217 model_->TabDestroyed(this);
217 } 218 }
218 219
219 void HungPagesTableModel::TabContentsObserverImpl::TabContentsDestroyed( 220 void HungPagesTableModel::TabContentsObserverImpl::TabContentsDestroyed(
220 TabContents* tab) { 221 TabContents* tab) {
221 model_->TabDestroyed(this); 222 model_->TabDestroyed(this);
222 } 223 }
223 224
224 /////////////////////////////////////////////////////////////////////////////// 225 ///////////////////////////////////////////////////////////////////////////////
225 // HungRendererDialogView 226 // HungRendererDialogView
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 g_instance->ShowForTabContents(contents); 559 g_instance->ShowForTabContents(contents);
559 } 560 }
560 } 561 }
561 562
562 void HideNativeHungRendererDialog(TabContents* contents) { 563 void HideNativeHungRendererDialog(TabContents* contents) {
563 if (!logging::DialogsAreSuppressed() && g_instance) 564 if (!logging::DialogsAreSuppressed() && g_instance)
564 g_instance->EndForTabContents(contents); 565 g_instance->EndForTabContents(contents);
565 } 566 }
566 567
567 } // namespace browser 568 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_contents/tab_contents_wrapper.cc ('k') | chrome/browser/ui/views/tab_contents/tab_contents_view_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698