| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_DOM_UI_HTML_DIALOG_UI_H_ | 5 #ifndef CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_ |
| 6 #define CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_ | 6 #define CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 | 44 |
| 45 // A callback to notify the delegate that the dialog closed. | 45 // A callback to notify the delegate that the dialog closed. |
| 46 virtual void OnDialogClosed(const std::string& json_retval) = 0; | 46 virtual void OnDialogClosed(const std::string& json_retval) = 0; |
| 47 | 47 |
| 48 // A callback to notify the delegate that the contents have gone | 48 // A callback to notify the delegate that the contents have gone |
| 49 // away. Only relevant if your dialog hosts code that calls | 49 // away. Only relevant if your dialog hosts code that calls |
| 50 // windows.close() and you've allowed that. If the output parameter | 50 // windows.close() and you've allowed that. If the output parameter |
| 51 // is set to true, then the dialog is closed. The default is false. | 51 // is set to true, then the dialog is closed. The default is false. |
| 52 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) = 0; | 52 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) = 0; |
| 53 | 53 |
| 54 // A callback to allow the delegate to dictate that the window should not |
| 55 // have a title bar. This is useful when presenting branded interfaces. |
| 56 virtual bool ShouldShowDialogTitle() const = 0; |
| 57 |
| 54 protected: | 58 protected: |
| 55 virtual ~HtmlDialogUIDelegate() {} | 59 virtual ~HtmlDialogUIDelegate() {} |
| 56 }; | 60 }; |
| 57 | 61 |
| 58 // Displays file URL contents inside a modal HTML dialog. | 62 // Displays file URL contents inside a modal HTML dialog. |
| 59 // | 63 // |
| 60 // This application really should not use TabContents + DOMUI. It should instead | 64 // This application really should not use TabContents + DOMUI. It should instead |
| 61 // just embed a RenderView in a dialog and be done with it. | 65 // just embed a RenderView in a dialog and be done with it. |
| 62 // | 66 // |
| 63 // Before loading a URL corresponding to this DOMUI, the caller should set its | 67 // Before loading a URL corresponding to this DOMUI, the caller should set its |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 // Intended to be the place to collect the settings and lockdowns | 105 // Intended to be the place to collect the settings and lockdowns |
| 102 // necessary for running external UI conponents securely (e.g., the | 106 // necessary for running external UI conponents securely (e.g., the |
| 103 // cloud print dialog). | 107 // cloud print dialog). |
| 104 class ExternalHtmlDialogUI : public HtmlDialogUI { | 108 class ExternalHtmlDialogUI : public HtmlDialogUI { |
| 105 public: | 109 public: |
| 106 explicit ExternalHtmlDialogUI(TabContents* tab_contents); | 110 explicit ExternalHtmlDialogUI(TabContents* tab_contents); |
| 107 virtual ~ExternalHtmlDialogUI(); | 111 virtual ~ExternalHtmlDialogUI(); |
| 108 }; | 112 }; |
| 109 | 113 |
| 110 #endif // CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_ | 114 #endif // CHROME_BROWSER_DOM_UI_HTML_DIALOG_UI_H_ |
| OLD | NEW |