| 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_CONTENTS_H__ | 5 #ifndef CHROME_BROWSER_DOM_UI_HTML_DIALOG_CONTENTS_H__ |
| 6 #define CHROME_BROWSER_DOM_UI_HTML_DIALOG_CONTENTS_H__ | 6 #define CHROME_BROWSER_DOM_UI_HTML_DIALOG_CONTENTS_H__ |
| 7 | 7 |
| 8 #include "base/gfx/size.h" |
| 8 #include "chrome/browser/dom_ui/dom_ui_host.h" | 9 #include "chrome/browser/dom_ui/dom_ui_host.h" |
| 9 | 10 |
| 10 // Implement this class to receive notifications. | 11 // Implement this class to receive notifications. |
| 11 class HtmlDialogContentsDelegate { | 12 class HtmlDialogContentsDelegate { |
| 12 public: | 13 public: |
| 13 // Returns true if the contents needs to be run in a modal dialog. | 14 // Returns true if the contents needs to be run in a modal dialog. |
| 14 virtual bool IsDialogModal() const = 0; | 15 virtual bool IsDialogModal() const = 0; |
| 15 // Returns the title of the dialog. | 16 // Returns the title of the dialog. |
| 16 virtual std::wstring GetDialogTitle() const = 0; | 17 virtual std::wstring GetDialogTitle() const = 0; |
| 17 // Get the HTML file path for the content to load in the dialog. | 18 // Get the HTML file path for the content to load in the dialog. |
| 18 virtual GURL GetDialogContentURL() const = 0; | 19 virtual GURL GetDialogContentURL() const = 0; |
| 19 // Get the size of the dialog. | 20 // Get the size of the dialog. |
| 20 virtual void GetDialogSize(CSize* size) const = 0; | 21 virtual void GetDialogSize(gfx::Size* size) const = 0; |
| 21 // Gets the JSON string input to use when showing the dialog. | 22 // Gets the JSON string input to use when showing the dialog. |
| 22 virtual std::string GetDialogArgs() const = 0; | 23 virtual std::string GetDialogArgs() const = 0; |
| 23 // A callback to notify the delegate that the dialog closed. | 24 // A callback to notify the delegate that the dialog closed. |
| 24 virtual void OnDialogClosed(const std::string& json_retval) = 0; | 25 virtual void OnDialogClosed(const std::string& json_retval) = 0; |
| 25 | 26 |
| 26 protected: | 27 protected: |
| 27 ~HtmlDialogContentsDelegate() {} | 28 ~HtmlDialogContentsDelegate() {} |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 //////////////////////////////////////////////////////////////////////////////// | 31 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 68 |
| 68 // The delegate that knows how to display the dialog and receives the response | 69 // The delegate that knows how to display the dialog and receives the response |
| 69 // back from the dialog. | 70 // back from the dialog. |
| 70 HtmlDialogContentsDelegate* delegate_; | 71 HtmlDialogContentsDelegate* delegate_; |
| 71 | 72 |
| 72 DISALLOW_EVIL_CONSTRUCTORS(HtmlDialogContents); | 73 DISALLOW_EVIL_CONSTRUCTORS(HtmlDialogContents); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 #endif // CHROME_BROWSER_DOM_UI_HTML_DIALOG_CONTENTS_H__ | 76 #endif // CHROME_BROWSER_DOM_UI_HTML_DIALOG_CONTENTS_H__ |
| 76 | 77 |
| OLD | NEW |