| 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_HTML_DIALOG_WINDOW_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_COCOA_HTML_DIALOG_WINDOW_CONTROLLER_H_ |
| 6 #define CHROME_BROWSER_COCOA_HTML_DIALOG_WINDOW_CONTROLLER_H_ | 6 #define CHROME_BROWSER_COCOA_HTML_DIALOG_WINDOW_CONTROLLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #import <Cocoa/Cocoa.h> | 11 #import <Cocoa/Cocoa.h> |
| 12 | 12 |
| 13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
| 14 #include "base/scoped_ptr.h" | 14 #include "base/scoped_ptr.h" |
| 15 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 15 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
| 16 | 16 |
| 17 class HtmlDialogWindowDelegateBridge; | 17 class HtmlDialogWindowDelegateBridge; |
| 18 class Profile; | 18 class Profile; |
| 19 class TabContents; | 19 class TabContents; |
| 20 | 20 |
| 21 // This controller manages a dialog box with properties and HTML content taken | 21 // This controller manages a dialog box with properties and HTML content taken |
| 22 // from a HTMLDialogUIDelegate object. | 22 // from a HTMLDialogUIDelegate object. |
| 23 @interface HtmlDialogWindowController : NSWindowController { | 23 @interface HtmlDialogWindowController : NSWindowController { |
| 24 @private | 24 @private |
| 25 Profile* profile_; // weak. Always a non-incognito profile. | |
| 26 // Order here is important, as tab_contents_ may send messages to | 25 // Order here is important, as tab_contents_ may send messages to |
| 27 // delegate_ when it gets destroyed. | 26 // delegate_ when it gets destroyed. |
| 28 scoped_ptr<HtmlDialogWindowDelegateBridge> delegate_; | 27 scoped_ptr<HtmlDialogWindowDelegateBridge> delegate_; |
| 29 scoped_ptr<TabContents> tabContents_; | 28 scoped_ptr<TabContents> tabContents_; |
| 30 } | 29 } |
| 31 | 30 |
| 32 // Creates and shows an HtmlDialogWindowController with the given | 31 // Creates and shows an HtmlDialogWindowController with the given |
| 33 // delegate and profile. The window is automatically destroyed when it is | 32 // delegate and profile. The window is automatically destroyed when it is |
| 34 // closed. | 33 // closed. |
| 35 + (void)showHtmlDialog:(HtmlDialogUIDelegate*)delegate | 34 + (void)showHtmlDialog:(HtmlDialogUIDelegate*)delegate |
| (...skipping 10 matching lines...) Expand all Loading... |
| 46 | 45 |
| 47 // Loads the HTML content from the delegate; this is not a lightweight | 46 // Loads the HTML content from the delegate; this is not a lightweight |
| 48 // process which is why it is not part of the constructor. Must be | 47 // process which is why it is not part of the constructor. Must be |
| 49 // called before showWindow. | 48 // called before showWindow. |
| 50 - (void)loadDialogContents; | 49 - (void)loadDialogContents; |
| 51 | 50 |
| 52 @end | 51 @end |
| 53 | 52 |
| 54 #endif // CHROME_BROWSER_COCOA_HTML_DIALOG_WINDOW_CONTROLLER_H_ | 53 #endif // CHROME_BROWSER_COCOA_HTML_DIALOG_WINDOW_CONTROLLER_H_ |
| 55 | 54 |
| OLD | NEW |