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/views/hung_renderer_view.h" | 5 #include "chrome/browser/ui/views/hung_renderer_view.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/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "chrome/browser/favicon/favicon_tab_helper.h" | 10 #include "chrome/browser/favicon/favicon_tab_helper.h" |
11 #include "chrome/browser/platform_util.h" | 11 #include "chrome/browser/platform_util.h" |
12 #include "chrome/browser/ui/browser_dialogs.h" | 12 #include "chrome/browser/ui/browser_dialogs.h" |
13 #include "chrome/browser/ui/browser_finder.h" | 13 #include "chrome/browser/ui/browser_finder.h" |
14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 14 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 15 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
17 #include "chrome/browser/ui/views/constrained_window_views.h" | 17 #include "chrome/browser/ui/views/constrained_window_views.h" |
18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
19 #include "chrome/common/logging_chrome.h" | 19 #include "chrome/common/logging_chrome.h" |
20 #include "components/web_modal/web_contents_modal_dialog_host.h" | 20 #include "components/web_modal/web_contents_modal_dialog_host.h" |
21 #include "content/public/browser/render_process_host.h" | 21 #include "content/public/browser/render_process_host.h" |
22 #include "content/public/browser/render_view_host.h" | 22 #include "content/public/browser/render_view_host.h" |
23 #include "content/public/browser/web_contents.h" | 23 #include "content/public/browser/web_contents.h" |
24 #include "content/public/common/result_codes.h" | 24 #include "content/public/common/result_codes.h" |
25 #include "grit/chromium_strings.h" | |
26 #include "grit/generated_resources.h" | 25 #include "grit/generated_resources.h" |
27 #include "grit/theme_resources.h" | 26 #include "grit/theme_resources.h" |
28 #include "ui/aura/window.h" | 27 #include "ui/aura/window.h" |
29 #include "ui/base/l10n/l10n_util.h" | 28 #include "ui/base/l10n/l10n_util.h" |
30 #include "ui/base/resource/resource_bundle.h" | 29 #include "ui/base/resource/resource_bundle.h" |
31 #include "ui/gfx/canvas.h" | 30 #include "ui/gfx/canvas.h" |
32 #include "ui/views/controls/button/label_button.h" | 31 #include "ui/views/controls/button/label_button.h" |
33 #include "ui/views/controls/image_view.h" | 32 #include "ui/views/controls/image_view.h" |
34 #include "ui/views/controls/label.h" | 33 #include "ui/views/controls/label.h" |
35 #include "ui/views/layout/grid_layout.h" | 34 #include "ui/views/layout/grid_layout.h" |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 HungRendererDialogView* view = HungRendererDialogView::Create(toplevel_view); | 447 HungRendererDialogView* view = HungRendererDialogView::Create(toplevel_view); |
449 view->ShowForWebContents(contents); | 448 view->ShowForWebContents(contents); |
450 } | 449 } |
451 | 450 |
452 void HideHungRendererDialog(WebContents* contents) { | 451 void HideHungRendererDialog(WebContents* contents) { |
453 if (!logging::DialogsAreSuppressed() && HungRendererDialogView::GetInstance()) | 452 if (!logging::DialogsAreSuppressed() && HungRendererDialogView::GetInstance()) |
454 HungRendererDialogView::GetInstance()->EndForWebContents(contents); | 453 HungRendererDialogView::GetInstance()->EndForWebContents(contents); |
455 } | 454 } |
456 | 455 |
457 } // namespace chrome | 456 } // namespace chrome |
OLD | NEW |