| 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 |
| 103 // Returns the PropertyBag accessor object used to write the delegate pointer | 106 // Returns the PropertyBag accessor object used to write the delegate pointer |
| 104 // into the TabContents (see class-level comment above). | 107 // into the TabContents (see class-level comment above). |
| 105 static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); | 108 static PropertyAccessor<HtmlDialogUIDelegate*>& GetPropertyAccessor(); |
| 106 | 109 |
| 107 private: | 110 private: |
| 108 // WebUI | 111 // WebUI |
| 109 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; | 112 virtual void RenderViewCreated(RenderViewHost* render_view_host) OVERRIDE; |
| 110 | 113 |
| 111 // JS message handler. | 114 // JS message handler. |
| 112 void OnDialogClosed(const base::ListValue* args); | 115 void OnDialogClosed(const base::ListValue* args); |
| 113 | 116 |
| 114 DISALLOW_COPY_AND_ASSIGN(HtmlDialogUI); | 117 DISALLOW_COPY_AND_ASSIGN(HtmlDialogUI); |
| 115 }; | 118 }; |
| 116 | 119 |
| 117 // Displays external URL contents inside a modal HTML dialog. | 120 // Displays external URL contents inside a modal HTML dialog. |
| 118 // | 121 // |
| 119 // Intended to be the place to collect the settings and lockdowns | 122 // Intended to be the place to collect the settings and lockdowns |
| 120 // necessary for running external UI conponents securely (e.g., the | 123 // necessary for running external UI conponents securely (e.g., the |
| 121 // cloud print dialog). | 124 // cloud print dialog). |
| 122 class ExternalHtmlDialogUI : public HtmlDialogUI { | 125 class ExternalHtmlDialogUI : public HtmlDialogUI { |
| 123 public: | 126 public: |
| 124 explicit ExternalHtmlDialogUI(TabContents* tab_contents); | 127 explicit ExternalHtmlDialogUI(TabContents* tab_contents); |
| 125 virtual ~ExternalHtmlDialogUI(); | 128 virtual ~ExternalHtmlDialogUI(); |
| 126 }; | 129 }; |
| 127 | 130 |
| 128 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ | 131 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ |
| OLD | NEW |