| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/input_window_dialog.h" | 5 #include "chrome/browser/input_window_dialog.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 return TRUE; | 141 return TRUE; |
| 142 } | 142 } |
| 143 | 143 |
| 144 // static | 144 // static |
| 145 void GtkInputWindowDialog::OnWindowDestroy(GtkWidget* widget, | 145 void GtkInputWindowDialog::OnWindowDestroy(GtkWidget* widget, |
| 146 GtkInputWindowDialog* dialog) { | 146 GtkInputWindowDialog* dialog) { |
| 147 MessageLoop::current()->DeleteSoon(FROM_HERE, dialog); | 147 MessageLoop::current()->DeleteSoon(FROM_HERE, dialog); |
| 148 } | 148 } |
| 149 | 149 |
| 150 // static | 150 // static |
| 151 InputWindowDialog* InputWindowDialog::Create(gfx::NativeWindow parent, | 151 InputWindowDialog* InputWindowDialog::Create(gfx::NativeView parent, |
| 152 const std::wstring& window_title, | 152 const std::wstring& window_title, |
| 153 const std::wstring& label, | 153 const std::wstring& label, |
| 154 const std::wstring& contents, | 154 const std::wstring& contents, |
| 155 Delegate* delegate) { | 155 Delegate* delegate) { |
| 156 return new GtkInputWindowDialog(parent, | 156 return new GtkInputWindowDialog(GTK_WINDOW(gtk_widget_get_toplevel(parent)), |
| 157 WideToUTF8(window_title), | 157 WideToUTF8(window_title), |
| 158 WideToUTF8(label), | 158 WideToUTF8(label), |
| 159 WideToUTF8(contents), | 159 WideToUTF8(contents), |
| 160 delegate); | 160 delegate); |
| 161 } | 161 } |
| OLD | NEW |