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_finder.h" | 12 #include "chrome/browser/ui/browser_finder.h" |
13 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" | 13 #include "chrome/browser/ui/chrome_web_modal_dialog_manager_delegate.h" |
14 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" | 14 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" |
15 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" | 15 #include "chrome/browser/ui/tab_contents/tab_contents_iterator.h" |
16 #include "chrome/common/chrome_constants.h" | 16 #include "chrome/common/chrome_constants.h" |
17 #include "chrome/common/logging_chrome.h" | 17 #include "chrome/common/logging_chrome.h" |
18 #include "chrome/grit/generated_resources.h" | 18 #include "chrome/grit/generated_resources.h" |
19 #include "components/constrained_window/constrained_window_views.h" | 19 #include "components/constrained_window/constrained_window_views.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/theme_resources.h" | 25 #include "grit/theme_resources.h" |
26 #include "ui/aura/window.h" | |
27 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
28 #include "ui/base/resource/resource_bundle.h" | 27 #include "ui/base/resource/resource_bundle.h" |
29 #include "ui/gfx/canvas.h" | 28 #include "ui/gfx/canvas.h" |
30 #include "ui/views/controls/button/label_button.h" | 29 #include "ui/views/controls/button/label_button.h" |
31 #include "ui/views/controls/image_view.h" | 30 #include "ui/views/controls/image_view.h" |
32 #include "ui/views/controls/label.h" | 31 #include "ui/views/controls/label.h" |
33 #include "ui/views/layout/grid_layout.h" | 32 #include "ui/views/layout/grid_layout.h" |
34 #include "ui/views/layout/layout_constants.h" | 33 #include "ui/views/layout/layout_constants.h" |
35 #include "ui/views/widget/widget.h" | 34 #include "ui/views/widget/widget.h" |
36 #include "ui/views/window/client_view.h" | 35 #include "ui/views/window/client_view.h" |
37 | 36 |
38 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
39 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" | 38 #include "chrome/browser/hang_monitor/hang_crash_dump_win.h" |
40 #include "chrome/browser/profiles/profile.h" | 39 #include "chrome/browser/profiles/profile.h" |
41 #include "chrome/browser/shell_integration.h" | 40 #include "chrome/browser/shell_integration.h" |
42 #include "ui/base/win/shell.h" | 41 #include "ui/base/win/shell.h" |
43 #include "ui/views/win/hwnd_util.h" | 42 #include "ui/views/win/hwnd_util.h" |
44 #endif | 43 #endif |
45 | 44 |
| 45 #if defined(USE_AURA) |
| 46 #include "ui/aura/window.h" |
| 47 #endif |
| 48 |
46 using content::WebContents; | 49 using content::WebContents; |
47 | 50 |
48 HungRendererDialogView* HungRendererDialogView::g_instance_ = NULL; | 51 HungRendererDialogView* HungRendererDialogView::g_instance_ = NULL; |
49 | 52 |
50 /////////////////////////////////////////////////////////////////////////////// | 53 /////////////////////////////////////////////////////////////////////////////// |
51 // HungPagesTableModel, public: | 54 // HungPagesTableModel, public: |
52 | 55 |
53 HungPagesTableModel::HungPagesTableModel(Delegate* delegate) | 56 HungPagesTableModel::HungPagesTableModel(Delegate* delegate) |
54 : observer_(NULL), | 57 : observer_(NULL), |
55 delegate_(delegate) { | 58 delegate_(delegate) { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 | 442 |
440 // static | 443 // static |
441 void HungRendererDialogView::InitClass() { | 444 void HungRendererDialogView::InitClass() { |
442 static bool initialized = false; | 445 static bool initialized = false; |
443 if (!initialized) { | 446 if (!initialized) { |
444 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 447 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
445 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); | 448 frozen_icon_ = rb.GetImageSkiaNamed(IDR_FROZEN_TAB_ICON); |
446 initialized = true; | 449 initialized = true; |
447 } | 450 } |
448 } | 451 } |
OLD | NEW |