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_MODAL_HTML_DIALOG_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_ |
6 #define CHROME_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_ | 6 #define CHROME_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // HTMLDialogUIDelegate implementation: | 40 // HTMLDialogUIDelegate implementation: |
41 virtual bool IsDialogModal() const; | 41 virtual bool IsDialogModal() const; |
42 virtual std::wstring GetDialogTitle() const { return L"Gears"; } | 42 virtual std::wstring GetDialogTitle() const { return L"Gears"; } |
43 virtual GURL GetDialogContentURL() const; | 43 virtual GURL GetDialogContentURL() const; |
44 virtual void GetDOMMessageHandlers( | 44 virtual void GetDOMMessageHandlers( |
45 std::vector<DOMMessageHandler*>* handlers) const { } | 45 std::vector<DOMMessageHandler*>* handlers) const { } |
46 virtual void GetDialogSize(gfx::Size* size) const; | 46 virtual void GetDialogSize(gfx::Size* size) const; |
47 virtual std::string GetDialogArgs() const; | 47 virtual std::string GetDialogArgs() const; |
48 virtual void OnDialogClosed(const std::string& json_retval); | 48 virtual void OnDialogClosed(const std::string& json_retval); |
49 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } | 49 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } |
| 50 virtual bool ShouldShowDialogTitle() const { return true; } |
50 | 51 |
51 private: | 52 private: |
52 NotificationRegistrar registrar_; | 53 NotificationRegistrar registrar_; |
53 | 54 |
54 // The TabContents that opened the dialog. | 55 // The TabContents that opened the dialog. |
55 TabContents* contents_; | 56 TabContents* contents_; |
56 | 57 |
57 // The parameters needed to display a modal HTML dialog. | 58 // The parameters needed to display a modal HTML dialog. |
58 HtmlDialogUI::HtmlDialogParams params_; | 59 HtmlDialogUI::HtmlDialogParams params_; |
59 | 60 |
60 // Once we get our reply in OnModalDialogResponse we'll need to respond to the | 61 // Once we get our reply in OnModalDialogResponse we'll need to respond to the |
61 // plugin using this |sync_result| pointer so we store it between calls. | 62 // plugin using this |sync_result| pointer so we store it between calls. |
62 IPC::Message* sync_response_; | 63 IPC::Message* sync_response_; |
63 | 64 |
64 DISALLOW_COPY_AND_ASSIGN(ModalHtmlDialogDelegate); | 65 DISALLOW_COPY_AND_ASSIGN(ModalHtmlDialogDelegate); |
65 }; | 66 }; |
66 | 67 |
67 #endif // CHROME_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_ | 68 #endif // CHROME_BROWSER_MODAL_HTML_DIALOG_DELEGATE_H_ |
OLD | NEW |