| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ |
| 7 | 7 |
| 8 // A controller for the Mac hung renderer dialog window. Only one | 8 // A controller for the Mac hung renderer dialog window. Only one |
| 9 // instance of this controller can exist at any time, although a given | 9 // instance of this controller can exist at any time, although a given |
| 10 // controller is destroyed when its window is closed. | 10 // controller is destroyed when its window is closed. |
| 11 // | 11 // |
| 12 // The dialog itself displays a list of frozen tabs, all of which | 12 // The dialog itself displays a list of frozen tabs, all of which |
| 13 // share a render process. Since there can only be a single dialog | 13 // share a render process. Since there can only be a single dialog |
| 14 // open at a time, if showForTabContents is called for a different | 14 // open at a time, if showForTabContents is called for a different |
| 15 // tab, the dialog is repurposed to show a warning for the new tab. | 15 // tab, the dialog is repurposed to show a warning for the new tab. |
| 16 // | 16 // |
| 17 // The caller is required to call endForTabContents before deleting | 17 // The caller is required to call endForTabContents before deleting |
| 18 // any TabContents object. | 18 // any TabContents object. |
| 19 | 19 |
| 20 #import <Cocoa/Cocoa.h> | 20 #import <Cocoa/Cocoa.h> |
| 21 | 21 |
| 22 #include <vector> | 22 #include <vector> |
| 23 | 23 |
| 24 @interface HungRendererController : NSWindowController { | 24 #import "base/cocoa_protocols_mac.h" |
| 25 |
| 26 @interface HungRendererController : NSWindowController<NSTableViewDataSource> { |
| 25 @private | 27 @private |
| 26 IBOutlet NSButton* waitButton_; | 28 IBOutlet NSButton* waitButton_; |
| 27 IBOutlet NSButton* killButton_; | 29 IBOutlet NSButton* killButton_; |
| 28 IBOutlet NSTableView* tableView_; | 30 IBOutlet NSTableView* tableView_; |
| 29 IBOutlet NSImageView* imageView_; | 31 IBOutlet NSImageView* imageView_; |
| 30 IBOutlet NSTextField* messageView_; | 32 IBOutlet NSTextField* messageView_; |
| 31 | 33 |
| 32 // The TabContents for which this dialog is open. Should never be | 34 // The TabContents for which this dialog is open. Should never be |
| 33 // NULL while this dialog is open. | 35 // NULL while this dialog is open. |
| 34 TabContents* hungContents_; | 36 TabContents* hungContents_; |
| (...skipping 23 matching lines...) Expand all Loading... |
| 58 | 60 |
| 59 @end // HungRendererController | 61 @end // HungRendererController |
| 60 | 62 |
| 61 | 63 |
| 62 @interface HungRendererController (JustForTesting) | 64 @interface HungRendererController (JustForTesting) |
| 63 - (NSButton*)killButton; | 65 - (NSButton*)killButton; |
| 64 - (NSButton*)waitButton; | 66 - (NSButton*)waitButton; |
| 65 @end | 67 @end |
| 66 | 68 |
| 67 #endif // CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 69 #endif // CHROME_BROWSER_COCOA_HUNG_RENDERER_CONTROLLER_H_ |
| OLD | NEW |