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 #ifndef CHROME_BROWSER_UI_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_COCOA_HUNG_RENDERER_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_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. |
(...skipping 24 matching lines...) Expand all Loading... |
35 IBOutlet NSButton* killButton_; | 35 IBOutlet NSButton* killButton_; |
36 IBOutlet NSTableView* tableView_; | 36 IBOutlet NSTableView* tableView_; |
37 IBOutlet NSImageView* imageView_; | 37 IBOutlet NSImageView* imageView_; |
38 IBOutlet NSTextField* messageView_; | 38 IBOutlet NSTextField* messageView_; |
39 | 39 |
40 // The WebContents for which this dialog is open. Should never be | 40 // The WebContents for which this dialog is open. Should never be |
41 // NULL while this dialog is open. | 41 // NULL while this dialog is open. |
42 content::WebContents* hungContents_; | 42 content::WebContents* hungContents_; |
43 | 43 |
44 // Observes |hungContents_| in case it closes while the panel is up. | 44 // Observes |hungContents_| in case it closes while the panel is up. |
45 scoped_ptr<HungRendererWebContentsObserverBridge> hungContentsObserver_; | 45 std::unique_ptr<HungRendererWebContentsObserverBridge> hungContentsObserver_; |
46 | 46 |
47 // Backing data for |tableView_|. Titles of each WebContents that | 47 // Backing data for |tableView_|. Titles of each WebContents that |
48 // shares a renderer process with |hungContents_|. | 48 // shares a renderer process with |hungContents_|. |
49 base::scoped_nsobject<NSArray> hungTitles_; | 49 base::scoped_nsobject<NSArray> hungTitles_; |
50 | 50 |
51 // Favicons of each WebContents that shares a renderer process with | 51 // Favicons of each WebContents that shares a renderer process with |
52 // |hungContents_|. | 52 // |hungContents_|. |
53 base::scoped_nsobject<NSArray> hungFavicons_; | 53 base::scoped_nsobject<NSArray> hungFavicons_; |
54 } | 54 } |
55 | 55 |
56 // Shows or hides the hung renderer dialog for the given WebContents. | 56 // Shows or hides the hung renderer dialog for the given WebContents. |
57 + (void)showForWebContents:(content::WebContents*)contents; | 57 + (void)showForWebContents:(content::WebContents*)contents; |
58 + (void)endForWebContents:(content::WebContents*)contents; | 58 + (void)endForWebContents:(content::WebContents*)contents; |
59 | 59 |
60 // Kills the hung renderers. | 60 // Kills the hung renderers. |
61 - (IBAction)kill:(id)sender; | 61 - (IBAction)kill:(id)sender; |
62 | 62 |
63 // Waits longer for the renderers to respond. | 63 // Waits longer for the renderers to respond. |
64 - (IBAction)wait:(id)sender; | 64 - (IBAction)wait:(id)sender; |
65 | 65 |
66 @end // HungRendererController | 66 @end // HungRendererController |
67 | 67 |
68 | 68 |
69 @interface HungRendererController (JustForTesting) | 69 @interface HungRendererController (JustForTesting) |
70 - (NSButton*)killButton; | 70 - (NSButton*)killButton; |
71 - (MultiKeyEquivalentButton*)waitButton; | 71 - (MultiKeyEquivalentButton*)waitButton; |
72 @end | 72 @end |
73 | 73 |
74 #endif // CHROME_BROWSER_UI_COCOA_HUNG_RENDERER_CONTROLLER_H_ | 74 #endif // CHROME_BROWSER_UI_COCOA_HUNG_RENDERER_CONTROLLER_H_ |
OLD | NEW |