OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GTK_HTML_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_HTML_DIALOG_GTK_H_ |
6 #define CHROME_BROWSER_GTK_HTML_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_GTK_HTML_DIALOG_GTK_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
| 11 #include "app/gtk_signal.h" |
11 #include "base/scoped_ptr.h" | 12 #include "base/scoped_ptr.h" |
12 #include "chrome/browser/dom_ui/html_dialog_ui.h" | 13 #include "chrome/browser/dom_ui/html_dialog_ui.h" |
13 #include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h" | 14 #include "chrome/browser/dom_ui/html_dialog_tab_contents_delegate.h" |
14 #include "gfx/native_widget_types.h" | 15 #include "gfx/native_widget_types.h" |
15 #include "gfx/size.h" | 16 #include "gfx/size.h" |
16 | 17 |
17 typedef struct _GtkWidget GtkWidget; | 18 typedef struct _GtkWidget GtkWidget; |
18 | 19 |
19 class Browser; | 20 class Browser; |
20 class Profile; | 21 class Profile; |
(...skipping 23 matching lines...) Expand all Loading... |
44 virtual std::string GetDialogArgs() const; | 45 virtual std::string GetDialogArgs() const; |
45 virtual void OnDialogClosed(const std::string& json_retval); | 46 virtual void OnDialogClosed(const std::string& json_retval); |
46 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } | 47 virtual void OnCloseContents(TabContents* source, bool* out_close_dialog) { } |
47 | 48 |
48 // Overridden from TabContentsDelegate: | 49 // Overridden from TabContentsDelegate: |
49 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); | 50 virtual void MoveContents(TabContents* source, const gfx::Rect& pos); |
50 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); | 51 virtual void ToolbarSizeChanged(TabContents* source, bool is_animating); |
51 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); | 52 virtual void HandleKeyboardEvent(const NativeWebKeyboardEvent& event); |
52 | 53 |
53 private: | 54 private: |
54 static void OnResponse(GtkWidget* widget, int response, | 55 CHROMEGTK_CALLBACK_1(HtmlDialogGtk, void, OnResponse, int); |
55 HtmlDialogGtk* dialog); | |
56 | 56 |
57 // 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 |
58 // 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 |
59 // 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 |
60 // using this variable. | 60 // using this variable. |
61 HtmlDialogUIDelegate* delegate_; | 61 HtmlDialogUIDelegate* delegate_; |
62 | 62 |
63 gfx::NativeWindow parent_window_; | 63 gfx::NativeWindow parent_window_; |
64 | 64 |
65 GtkWidget* dialog_; | 65 GtkWidget* dialog_; |
66 | 66 |
67 scoped_ptr<TabContents> tab_contents_; | 67 scoped_ptr<TabContents> tab_contents_; |
68 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; | 68 scoped_ptr<TabContentsContainerGtk> tab_contents_container_; |
69 | 69 |
70 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); | 70 DISALLOW_COPY_AND_ASSIGN(HtmlDialogGtk); |
71 }; | 71 }; |
72 | 72 |
73 #endif // CHROME_BROWSER_GTK_HTML_DIALOG_GTK_H_ | 73 #endif // CHROME_BROWSER_GTK_HTML_DIALOG_GTK_H_ |
OLD | NEW |