| OLD | NEW |
| 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/browser_dialogs.h" | 5 #include "chrome/browser/ui/browser_dialogs.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) && !defined(USE_AURA) | 7 #if defined(OS_WIN) && !defined(USE_AURA) |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 #include "ui/views/widget/widget.h" | 39 #include "ui/views/widget/widget.h" |
| 40 #include "ui/views/window/client_view.h" | 40 #include "ui/views/window/client_view.h" |
| 41 #include "ui/views/window/dialog_delegate.h" | 41 #include "ui/views/window/dialog_delegate.h" |
| 42 | 42 |
| 43 #if defined(USE_AURA) | 43 #if defined(USE_AURA) |
| 44 #include "ui/aura/window.h" | 44 #include "ui/aura/window.h" |
| 45 #endif | 45 #endif |
| 46 | 46 |
| 47 class HungRendererDialogView; | 47 class HungRendererDialogView; |
| 48 | 48 |
| 49 using content::RenderViewHost; |
| 49 using content::WebContents; | 50 using content::WebContents; |
| 50 | 51 |
| 51 namespace { | 52 namespace { |
| 52 // We only support showing one of these at a time per app. | 53 // We only support showing one of these at a time per app. |
| 53 HungRendererDialogView* g_instance = NULL; | 54 HungRendererDialogView* g_instance = NULL; |
| 54 } | 55 } |
| 55 | 56 |
| 56 /////////////////////////////////////////////////////////////////////////////// | 57 /////////////////////////////////////////////////////////////////////////////// |
| 57 // HungPagesTableModel | 58 // HungPagesTableModel |
| 58 | 59 |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 g_instance->ShowForWebContents(contents); | 576 g_instance->ShowForWebContents(contents); |
| 576 } | 577 } |
| 577 } | 578 } |
| 578 | 579 |
| 579 void HideHungRendererDialog(WebContents* contents) { | 580 void HideHungRendererDialog(WebContents* contents) { |
| 580 if (!logging::DialogsAreSuppressed() && g_instance) | 581 if (!logging::DialogsAreSuppressed() && g_instance) |
| 581 g_instance->EndForWebContents(contents); | 582 g_instance->EndForWebContents(contents); |
| 582 } | 583 } |
| 583 | 584 |
| 584 } // namespace browser | 585 } // namespace browser |
| OLD | NEW |