| 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 "base/mac/mac_util.h" | 9 #include "base/mac/mac_util.h" |
| 10 #include "base/process_util.h" | 10 #include "base/process_util.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 // Make the "wait" button respond to additional keys. By setting this to | 79 // Make the "wait" button respond to additional keys. By setting this to |
| 80 // @"\e", it will respond to both Esc and Command-. (period). | 80 // @"\e", it will respond to both Esc and Command-. (period). |
| 81 KeyEquivalentAndModifierMask key; | 81 KeyEquivalentAndModifierMask key; |
| 82 key.charCode = @"\e"; | 82 key.charCode = @"\e"; |
| 83 [waitButton_ addKeyEquivalent:key]; | 83 [waitButton_ addKeyEquivalent:key]; |
| 84 } | 84 } |
| 85 | 85 |
| 86 - (IBAction)kill:(id)sender { | 86 - (IBAction)kill:(id)sender { |
| 87 if (hungContents_) | 87 if (hungContents_) |
| 88 base::KillProcess(hungContents_->GetRenderProcessHost()->GetHandle(), | 88 base::KillProcess(hungContents_->GetRenderProcessHost()->GetHandle(), |
| 89 ResultCodes::HUNG, false); | 89 content::RESULT_CODE_HUNG, false); |
| 90 // Cannot call performClose:, because the close button is disabled. | 90 // Cannot call performClose:, because the close button is disabled. |
| 91 [self close]; | 91 [self close]; |
| 92 } | 92 } |
| 93 | 93 |
| 94 - (IBAction)wait:(id)sender { | 94 - (IBAction)wait:(id)sender { |
| 95 if (hungContents_ && hungContents_->render_view_host()) | 95 if (hungContents_ && hungContents_->render_view_host()) |
| 96 hungContents_->render_view_host()->RestartHangMonitorTimeout(); | 96 hungContents_->render_view_host()->RestartHangMonitorTimeout(); |
| 97 // Cannot call performClose:, because the close button is disabled. | 97 // Cannot call performClose:, because the close button is disabled. |
| 98 [self close]; | 98 [self close]; |
| 99 } | 99 } |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 [g_instance showForTabContents:contents]; | 189 [g_instance showForTabContents:contents]; |
| 190 } | 190 } |
| 191 } | 191 } |
| 192 | 192 |
| 193 void HideHungRendererDialog(TabContents* contents) { | 193 void HideHungRendererDialog(TabContents* contents) { |
| 194 if (!logging::DialogsAreSuppressed() && g_instance) | 194 if (!logging::DialogsAreSuppressed() && g_instance) |
| 195 [g_instance endForTabContents:contents]; | 195 [g_instance endForTabContents:contents]; |
| 196 } | 196 } |
| 197 | 197 |
| 198 } // namespace browser | 198 } // namespace browser |
| OLD | NEW |