| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_WEBUI_HTML_DIALOG_UI_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ |
| 6 #define CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 // Height of the dialog. | 93 // Height of the dialog. |
| 94 int height; | 94 int height; |
| 95 // The JSON input to pass to the dialog when showing it. | 95 // The JSON input to pass to the dialog when showing it. |
| 96 std::string json_input; | 96 std::string json_input; |
| 97 }; | 97 }; |
| 98 | 98 |
| 99 // When created, the property should already be set on the TabContents. | 99 // When created, the property should already be set on the TabContents. |
| 100 explicit HtmlDialogUI(TabContents* tab_contents); | 100 explicit HtmlDialogUI(TabContents* tab_contents); |
| 101 virtual ~HtmlDialogUI(); | 101 virtual ~HtmlDialogUI(); |
| 102 | 102 |
| 103 // Close the dialog, passing the specified arguments to the close handler. | |
| 104 void CloseDialog(const base::ListValue* args); | |
| 105 | |
| 106 // Returns the PropertyBag accessor object used to write the delegate pointer | 103 // Returns the PropertyBag accessor object used to write the delegate pointer |
| 107 // into the TabContents (see class-level comment above). | 104 // into the TabContents (see class-level comment above). |
| 108 static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); | 105 static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); |
| 109 | 106 |
| 110 private: | 107 private: |
| 111 // WebUI | 108 // WebUI |
| 112 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 109 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 113 | 110 |
| 114 // JS message handler. | 111 // JS message handler. |
| 115 void OnDialogClosed(const base::ListValue* args); | 112 void OnDialogClosed(const base::ListValue* args); |
| 116 | 113 |
| 117 DISALLOW_COPY_AND_ASSIGN(HtmlDialogUI); | 114 DISALLOW_COPY_AND_ASSIGN(HtmlDialogUI); |
| 118 }; | 115 }; |
| 119 | 116 |
| 120 // Displays external URL contents inside a modal HTML dialog. | 117 // Displays external URL contents inside a modal HTML dialog. |
| 121 // | 118 // |
| 122 // Intended to be the place to collect the settings and lockdowns | 119 // Intended to be the place to collect the settings and lockdowns |
| 123 // necessary for running external UI conponents securely (e.g., the | 120 // necessary for running external UI conponents securely (e.g., the |
| 124 // cloud print dialog). | 121 // cloud print dialog). |
| 125 class ExternalHtmlDialogUI : public HtmlDialogUI { | 122 class ExternalHtmlDialogUI : public HtmlDialogUI { |
| 126 public: | 123 public: |
| 127 explicit ExternalHtmlDialogUI(TabContents* tab_contents); | 124 explicit ExternalHtmlDialogUI(TabContents* tab_contents); |
| 128 virtual ~ExternalHtmlDialogUI(); | 125 virtual ~ExternalHtmlDialogUI(); |
| 129 }; | 126 }; |
| 130 | 127 |
| 131 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ | 128 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ |
| OLD | NEW |