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

Side by Side Diff: chrome/browser/ui/gtk/hung_renderer_dialog_gtk.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 <gtk/gtk.h> 7 #include <gtk/gtk.h>
8 8
9 #include "base/process_util.h" 9 #include "base/process_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 // Dismiss the panel if |contents_| is closed or its renderer exits. 42 // Dismiss the panel if |contents_| is closed or its renderer exits.
43 class TabContentsObserverImpl : public TabContentsObserver { 43 class TabContentsObserverImpl : public TabContentsObserver {
44 public: 44 public:
45 TabContentsObserverImpl(HungRendererDialogGtk* dialog, 45 TabContentsObserverImpl(HungRendererDialogGtk* dialog,
46 TabContents* contents) 46 TabContents* contents)
47 : TabContentsObserver(contents), 47 : TabContentsObserver(contents),
48 dialog_(dialog) { 48 dialog_(dialog) {
49 } 49 }
50 50
51 // TabContentsObserver overrides: 51 // TabContentsObserver overrides:
52 virtual void RenderViewGone() OVERRIDE { 52 virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE {
53 dialog_->Hide(); 53 dialog_->Hide();
54 } 54 }
55 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE { 55 virtual void TabContentsDestroyed(TabContents* tab) OVERRIDE {
56 dialog_->Hide(); 56 dialog_->Hide();
57 } 57 }
58 58
59 private: 59 private:
60 HungRendererDialogGtk* dialog_; // weak 60 HungRendererDialogGtk* dialog_; // weak
61 61
62 DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl); 62 DISALLOW_COPY_AND_ASSIGN(TabContentsObserverImpl);
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 g_instance->ShowForTabContents(contents); 256 g_instance->ShowForTabContents(contents);
257 } 257 }
258 } 258 }
259 259
260 void HideNativeHungRendererDialog(TabContents* contents) { 260 void HideNativeHungRendererDialog(TabContents* contents) {
261 if (!logging::DialogsAreSuppressed() && g_instance) 261 if (!logging::DialogsAreSuppressed() && g_instance)
262 g_instance->EndForTabContents(contents); 262 g_instance->EndForTabContents(contents);
263 } 263 }
264 264
265 } // namespace browser 265 } // namespace browser
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/tab_contents/sad_tab_view.mm ('k') | chrome/browser/ui/sad_tab_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698