| 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;
|
| +
|
| + 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();
|
|
|