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_GTK_HTML_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
6 #define CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 17 matching lines...) Expand all Loading... |
28 public HtmlDialogUIDelegate { | 28 public HtmlDialogUIDelegate { |
29 public: | 29 public: |
30 HtmlDialogGtk(Profile* profile, HtmlDialogUIDelegate* delegate, | 30 HtmlDialogGtk(Profile* profile, HtmlDialogUIDelegate* delegate, |
31 gfx::NativeWindow parent_window); | 31 gfx::NativeWindow parent_window); |
32 virtual ~HtmlDialogGtk(); | 32 virtual ~HtmlDialogGtk(); |
33 | 33 |
34 // Initializes the contents of the dialog (the DOMView and the callbacks). | 34 // Initializes the contents of the dialog (the DOMView and the callbacks). |
35 gfx::NativeWindow InitDialog(); | 35 gfx::NativeWindow InitDialog(); |
36 | 36 |
37 // Overridden from HtmlDialogUI::Delegate: | 37 // Overridden from HtmlDialogUI::Delegate: |
38 virtual bool IsDialogModal() const; | 38 virtual bool IsDialogModal() const OVERRIDE; |
39 virtual std::wstring GetDialogTitle() const; | 39 virtual string16 GetDialogTitle() const OVERRIDE; |
40 virtual GURL GetDialogContentURL() const; | 40 virtual GURL GetDialogContentURL() const OVERRIDE; |
41 virtual void GetWebUIMessageHandlers( | 41 virtual void GetWebUIMessageHandlers( |
42 std::vector<WebUIMessageHandler*>* handlers) const; | 42 std::vector<WebUIMessageHandler*>* handlers) const OVERRIDE; |
43 virtual void GetDialogSize(gfx::Size* size) const; | 43 virtual void GetDialogSize(gfx::Size* size) const OVERRIDE; |
44 virtual std::string GetDialogArgs() const; | 44 virtual std::string GetDialogArgs() const OVERRIDE; |
45 virtual void OnDialogClosed(const std::string& json_retval); | 45 virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE; |
46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog); | 46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) |
47 virtual void CloseContents(TabContents* source); | 47 OVERRIDE; |
48 virtual bool ShouldShowDialogTitle() const; | 48 virtual void CloseContents(TabContents* source) OVERRIDE; |
| 49 virtual bool ShouldShowDialogTitle() const OVERRIDE; |
49 | 50 |
50 // Overridden from TabContentsDelegate: | 51 // Overridden from TabContentsDelegate: |
51 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 52 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
52 | 53 |
53 private: | 54 private: |
54 CHROMEGTK_CALLBACK_1(HtmlDialogGtk, void, OnResponse, int); | 55 CHROMEGTK_CALLBACK_1(HtmlDialogGtk, void, OnResponse, int); |
55 | 56 |
56 // This view is a delegate to the HTML content since it needs to get notified | 57 // This view is a delegate to the HTML content since it needs to get notified |
57 // about when the dialog is closing. For all other actions (besides dialog | 58 // about when the dialog is closing. For all other actions (besides dialog |
58 // closing) we delegate to the creator of this view, which we keep track of | 59 // closing) we delegate to the creator of this view, which we keep track of |
59 // using this variable. | 60 // using this variable. |
60 HtmlDialogUIDelegate* delegate_; | 61 HtmlDialogUIDelegate* delegate_; |
61 | 62 |
62 gfx::NativeWindow parent_window_; | 63 gfx::NativeWindow parent_window_; |
63 | 64 |
64 GtkWidget* dialog_; | 65 GtkWidget* dialog_; |
65 | 66 |
66 scoped_ptr<TabContentsWrapper> tab_; | 67 scoped_ptr<TabContentsWrapper> tab_; |
67 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; | 68 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); | 70 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); |
70 }; | 71 }; |
71 | 72 |
72 #endif // CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ | 73 #endif // CHROME_BROWSER_UI_GTK_HTML_DIALOG_GTK_H_ |
OLD | NEW |