Chromium Code Reviews| Index: chrome/browser/ui/webui/constrained_html_ui.h |
| =================================================================== |
| --- chrome/browser/ui/webui/constrained_html_ui.h (revision 104824) |
| +++ chrome/browser/ui/webui/constrained_html_ui.h (working copy) |
| @@ -23,6 +23,14 @@ |
| // Called when the dialog is being closed in response to a "DialogClose" |
| // message from WebUI. |
| virtual void OnDialogCloseFromWebUI() = 0; |
| + |
| + // If called, on dialog closure, the dialog will release its TabContents |
| + // instead of destroying it. After which point, the caller will own the |
| + // released TabContents. |
| + virtual void ReleaseTabContentsOnDialogClose() = 0; |
|
Evan Stade
2011/10/11 02:49:17
what is the point of this? seems like it's only us
Lei Zhang
2011/10/11 03:15:58
I'm splitting this chunk of code into a separate C
Evan Stade
2011/10/11 22:54:59
it's impossible for me to review a design without
Lei Zhang
2011/10/11 23:04:57
Sorry, much of the bigger CL is monolithic. You ca
|
| + |
| + protected: |
| + virtual ~ConstrainedHtmlUIDelegate() {} |
| }; |
| // ConstrainedHtmlUI is a facility to show HTML WebUI content |
| @@ -46,12 +54,23 @@ |
| HtmlDialogUIDelegate* delegate, |
| TabContentsWrapper* overshadowed); |
| + // Similar to CreateConstrainedHtmlDialog() but specifically for print |
| + // preview, where we care about the constrained TabContentsWrapper rather |
| + // than the ConstrainedWindow. |
| + static TabContentsWrapper* CreateConstrainedPrintPreviewHtmlUI( |
| + Profile* profile, |
| + HtmlDialogUIDelegate* delegate, |
| + TabContentsWrapper* overshadowed); |
| + |
| // Returns a property accessor that can be used to set the |
| // ConstrainedHtmlUIDelegate property on a TabContents. |
| static PropertyAccessor<ConstrainedHtmlUIDelegate*>& |
| GetPropertyAccessor(); |
| private: |
| + FRIEND_TEST_ALL_PREFIXES(ConstrainedHtmlDialogBrowserTest, |
| + ReleaseTabContentsOnDialogClose); |
| + |
| // Returns the TabContents' PropertyBag's ConstrainedHtmlUIDelegate. |
| // Returns NULL if that property is not set. |
| ConstrainedHtmlUIDelegate* GetConstrainedDelegate(); |