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 #include "chrome/browser/ui/gtk/html_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/html_dialog_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_window.h" | 10 #include "chrome/browser/browser_window.h" |
11 #include "chrome/browser/dom_ui/html_dialog_ui.h" | |
12 #include "chrome/browser/tab_contents/tab_contents.h" | 11 #include "chrome/browser/tab_contents/tab_contents.h" |
13 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
14 #include "chrome/browser/ui/browser_dialogs.h" | 13 #include "chrome/browser/ui/browser_dialogs.h" |
15 #include "chrome/browser/ui/gtk/gtk_util.h" | 14 #include "chrome/browser/ui/gtk/gtk_util.h" |
16 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" | 15 #include "chrome/browser/ui/gtk/tab_contents_container_gtk.h" |
| 16 #include "chrome/browser/webui/html_dialog_ui.h" |
17 #include "chrome/common/native_web_keyboard_event.h" | 17 #include "chrome/common/native_web_keyboard_event.h" |
18 #include "ipc/ipc_message.h" | 18 #include "ipc/ipc_message.h" |
19 | 19 |
20 namespace browser { | 20 namespace browser { |
21 | 21 |
22 gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile, | 22 gfx::NativeWindow ShowHtmlDialog(gfx::NativeWindow parent, Profile* profile, |
23 HtmlDialogUIDelegate* delegate) { | 23 HtmlDialogUIDelegate* delegate) { |
24 HtmlDialogGtk* html_dialog = | 24 HtmlDialogGtk* html_dialog = |
25 new HtmlDialogGtk(profile, delegate, parent); | 25 new HtmlDialogGtk(profile, delegate, parent); |
26 return html_dialog->InitDialog(); | 26 return html_dialog->InitDialog(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 dialog_size.height()); | 167 dialog_size.height()); |
168 | 168 |
169 gtk_widget_show_all(dialog_); | 169 gtk_widget_show_all(dialog_); |
170 | 170 |
171 return GTK_WINDOW(dialog_); | 171 return GTK_WINDOW(dialog_); |
172 } | 172 } |
173 | 173 |
174 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { | 174 void HtmlDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { |
175 OnDialogClosed(std::string()); | 175 OnDialogClosed(std::string()); |
176 } | 176 } |
OLD | NEW |