| 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> |
| 11 | 11 |
| 12 #include "base/string16.h" |
| 12 #include "chrome/browser/ui/webui/chrome_web_ui.h" | 13 #include "chrome/browser/ui/webui/chrome_web_ui.h" |
| 13 #include "content/common/property_bag.h" | 14 #include "content/common/property_bag.h" |
| 14 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 15 | 16 |
| 16 namespace gfx { | 17 namespace gfx { |
| 17 class Size; | 18 class Size; |
| 18 } | 19 } |
| 19 | 20 |
| 20 struct ContextMenuParams; | 21 struct ContextMenuParams; |
| 21 | 22 |
| 22 namespace base { | 23 namespace base { |
| 23 class ListValue; | 24 class ListValue; |
| 24 } | 25 } |
| 25 | 26 |
| 26 // Implement this class to receive notifications. | 27 // Implement this class to receive notifications. |
| 27 class HtmlDialogUIDelegate { | 28 class HtmlDialogUIDelegate { |
| 28 public: | 29 public: |
| 29 // Returns true if the contents needs to be run in a modal dialog. | 30 // Returns true if the contents needs to be run in a modal dialog. |
| 30 virtual bool IsDialogModal() const = 0; | 31 virtual bool IsDialogModal() const = 0; |
| 31 | 32 |
| 32 // Returns the title of the dialog. | 33 // Returns the title of the dialog. |
| 33 virtual std::wstring GetDialogTitle() const = 0; | 34 virtual string16 GetDialogTitle() const = 0; |
| 34 | 35 |
| 35 // Get the HTML file path for the content to load in the dialog. | 36 // Get the HTML file path for the content to load in the dialog. |
| 36 virtual GURL GetDialogContentURL() const = 0; | 37 virtual GURL GetDialogContentURL() const = 0; |
| 37 | 38 |
| 38 // Get WebUIMessageHandler objects to handle messages from the HTML/JS page. | 39 // Get WebUIMessageHandler objects to handle messages from the HTML/JS page. |
| 39 // The handlers are used to send and receive messages from the page while it | 40 // The handlers are used to send and receive messages from the page while it |
| 40 // is still open. Ownership of each handler is taken over by the WebUI | 41 // is still open. Ownership of each handler is taken over by the WebUI |
| 41 // hosting the page. | 42 // hosting the page. |
| 42 virtual void GetWebUIMessageHandlers( | 43 virtual void GetWebUIMessageHandlers( |
| 43 std::vector<WebUIMessageHandler*>* handlers) const = 0; | 44 std::vector<WebUIMessageHandler*>* handlers) const = 0; |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 // Intended to be the place to collect the settings and lockdowns | 121 // Intended to be the place to collect the settings and lockdowns |
| 121 // necessary for running external UI conponents securely (e.g., the | 122 // necessary for running external UI conponents securely (e.g., the |
| 122 // cloud print dialog). | 123 // cloud print dialog). |
| 123 class ExternalHtmlDialogUI : public HtmlDialogUI { | 124 class ExternalHtmlDialogUI : public HtmlDialogUI { |
| 124 public: | 125 public: |
| 125 explicit ExternalHtmlDialogUI(TabContents* tab_contents); | 126 explicit ExternalHtmlDialogUI(TabContents* tab_contents); |
| 126 virtual ~ExternalHtmlDialogUI(); | 127 virtual ~ExternalHtmlDialogUI(); |
| 127 }; | 128 }; |
| 128 | 129 |
| 129 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ | 130 #endif // CHROME_BROWSER_UI_WEBUI_HTML_DIALOG_UI_H_ |
| OLD | NEW |