| 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 #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/bundle_locations.h" | 9 #include "base/mac/bundle_locations.h" |
| 10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 HungRendererController* controller) | 44 HungRendererController* controller) |
| 45 : content::WebContentsObserver(web_contents), | 45 : content::WebContentsObserver(web_contents), |
| 46 controller_(controller) { | 46 controller_(controller) { |
| 47 } | 47 } |
| 48 | 48 |
| 49 protected: | 49 protected: |
| 50 // WebContentsObserver overrides: | 50 // WebContentsObserver overrides: |
| 51 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE { | 51 virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE { |
| 52 [controller_ renderProcessGone]; | 52 [controller_ renderProcessGone]; |
| 53 } | 53 } |
| 54 virtual void WebContentsDestroyed(WebContents* tab) OVERRIDE { | 54 virtual void WebContentsDestroyed() OVERRIDE { |
| 55 [controller_ renderProcessGone]; | 55 [controller_ renderProcessGone]; |
| 56 } | 56 } |
| 57 | 57 |
| 58 private: | 58 private: |
| 59 HungRendererController* controller_; // weak | 59 HungRendererController* controller_; // weak |
| 60 | 60 |
| 61 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverBridge); | 61 DISALLOW_COPY_AND_ASSIGN(WebContentsObserverBridge); |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 @implementation HungRendererController | 64 @implementation HungRendererController |
| (...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 [g_instance showForWebContents:contents]; | 231 [g_instance showForWebContents:contents]; |
| 232 } | 232 } |
| 233 } | 233 } |
| 234 | 234 |
| 235 void HideHungRendererDialog(WebContents* contents) { | 235 void HideHungRendererDialog(WebContents* contents) { |
| 236 if (!logging::DialogsAreSuppressed() && g_instance) | 236 if (!logging::DialogsAreSuppressed() && g_instance) |
| 237 [g_instance endForWebContents:contents]; | 237 [g_instance endForWebContents:contents]; |
| 238 } | 238 } |
| 239 | 239 |
| 240 } // namespace chrome | 240 } // namespace chrome |
| OLD | NEW |