| OLD | NEW |
| 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 #import "chrome/browser/ui/cocoa/hung_renderer_controller.h" | 5 #import "chrome/browser/ui/cocoa/hung_renderer_controller.h" |
| 6 | 6 |
| 7 #import <Cocoa/Cocoa.h> | 7 #import <Cocoa/Cocoa.h> |
| 8 | 8 |
| 9 #include "app/mac/nsimage_cache.h" | |
| 10 #include "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 11 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| 12 #include "base/sys_string_conversions.h" | 11 #include "base/sys_string_conversions.h" |
| 13 #include "chrome/browser/favicon/favicon_tab_helper.h" | 12 #include "chrome/browser/favicon/favicon_tab_helper.h" |
| 14 #include "chrome/browser/ui/browser_dialogs.h" | 13 #include "chrome/browser/ui/browser_dialogs.h" |
| 15 #include "chrome/browser/ui/browser_list.h" | 14 #include "chrome/browser/ui/browser_list.h" |
| 16 #import "chrome/browser/ui/cocoa/multi_key_equivalent_button.h" | 15 #import "chrome/browser/ui/cocoa/multi_key_equivalent_button.h" |
| 16 #import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h" |
| 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" | 17 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" |
| 18 #include "chrome/common/logging_chrome.h" | 18 #include "chrome/common/logging_chrome.h" |
| 19 #include "content/browser/renderer_host/render_process_host.h" | 19 #include "content/browser/renderer_host/render_process_host.h" |
| 20 #include "content/browser/renderer_host/render_view_host.h" | 20 #include "content/browser/renderer_host/render_view_host.h" |
| 21 #include "content/browser/tab_contents/tab_contents.h" | 21 #include "content/browser/tab_contents/tab_contents.h" |
| 22 #import "chrome/browser/ui/cocoa/tab_contents/favicon_util.h" | |
| 23 #include "content/common/result_codes.h" | 22 #include "content/common/result_codes.h" |
| 24 #include "grit/app_resources.h" | 23 #include "grit/app_resources.h" |
| 25 #include "grit/chromium_strings.h" | 24 #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 "skia/ext/skia_utils_mac.h" | 27 #include "skia/ext/skia_utils_mac.h" |
| 29 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" | 28 #include "third_party/GTM/AppKit/GTMUILocalizerAndLayoutTweaker.h" |
| 30 #include "ui/base/l10n/l10n_util_mac.h" | 29 #include "ui/base/l10n/l10n_util_mac.h" |
| 31 #include "ui/base/resource/resource_bundle.h" | 30 #include "ui/base/resource/resource_bundle.h" |
| 32 #include "ui/gfx/image/image.h" | 31 #include "ui/gfx/image/image.h" |
| 32 #include "ui/gfx/mac/nsimage_cache.h" |
| 33 | 33 |
| 34 namespace { | 34 namespace { |
| 35 // We only support showing one of these at a time per app. The | 35 // We only support showing one of these at a time per app. The |
| 36 // controller owns itself and is released when its window is closed. | 36 // controller owns itself and is released when its window is closed. |
| 37 HungRendererController* g_instance = NULL; | 37 HungRendererController* g_instance = NULL; |
| 38 } // end namespace | 38 } // end namespace |
| 39 | 39 |
| 40 @implementation HungRendererController | 40 @implementation HungRendererController |
| 41 | 41 |
| 42 - (id)initWithWindowNibName:(NSString*)nibName { | 42 - (id)initWithWindowNibName:(NSString*)nibName { |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 [g_instance showForTabContents:contents]; | 190 [g_instance showForTabContents:contents]; |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 void HideHungRendererDialog(TabContents* contents) { | 194 void HideHungRendererDialog(TabContents* contents) { |
| 195 if (!logging::DialogsAreSuppressed() && g_instance) | 195 if (!logging::DialogsAreSuppressed() && g_instance) |
| 196 [g_instance endForTabContents:contents]; | 196 [g_instance endForTabContents:contents]; |
| 197 } | 197 } |
| 198 | 198 |
| 199 } // namespace browser | 199 } // namespace browser |
| OLD | NEW |