| 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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 initialized = true; | 573 initialized = true; |
| 574 } | 574 } |
| 575 } | 575 } |
| 576 | 576 |
| 577 static HungRendererDialogView* CreateHungRendererDialogView() { | 577 static HungRendererDialogView* CreateHungRendererDialogView() { |
| 578 HungRendererDialogView* cv = new HungRendererDialogView; | 578 HungRendererDialogView* cv = new HungRendererDialogView; |
| 579 views::Widget::CreateWindow(cv); | 579 views::Widget::CreateWindow(cv); |
| 580 return cv; | 580 return cv; |
| 581 } | 581 } |
| 582 | 582 |
| 583 namespace browser { | 583 namespace chrome { |
| 584 | 584 |
| 585 void ShowHungRendererDialog(WebContents* contents) { | 585 void ShowHungRendererDialog(WebContents* contents) { |
| 586 if (!logging::DialogsAreSuppressed()) { | 586 if (!logging::DialogsAreSuppressed()) { |
| 587 if (!g_instance) | 587 if (!g_instance) |
| 588 g_instance = CreateHungRendererDialogView(); | 588 g_instance = CreateHungRendererDialogView(); |
| 589 g_instance->ShowForWebContents(contents); | 589 g_instance->ShowForWebContents(contents); |
| 590 } | 590 } |
| 591 } | 591 } |
| 592 | 592 |
| 593 void HideHungRendererDialog(WebContents* contents) { | 593 void HideHungRendererDialog(WebContents* contents) { |
| 594 if (!logging::DialogsAreSuppressed() && g_instance) | 594 if (!logging::DialogsAreSuppressed() && g_instance) |
| 595 g_instance->EndForWebContents(contents); | 595 g_instance->EndForWebContents(contents); |
| 596 } | 596 } |
| 597 | 597 |
| 598 } // namespace browser | 598 } // namespace chrome |
| OLD | NEW |