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/importer/import_lock_dialog_gtk.h" | 5 #include "chrome/browser/ui/gtk/importer/import_lock_dialog_gtk.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); | 59 gtk_box_pack_start(GTK_BOX(content_area), label, FALSE, FALSE, 0); |
60 | 60 |
61 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this); | 61 g_signal_connect(dialog_, "response", G_CALLBACK(OnResponseThunk), this); |
62 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); | 62 gtk_window_set_resizable(GTK_WINDOW(dialog_), FALSE); |
63 gtk_widget_show_all(dialog_); | 63 gtk_widget_show_all(dialog_); |
64 } | 64 } |
65 | 65 |
66 ImportLockDialogGtk::~ImportLockDialogGtk() {} | 66 ImportLockDialogGtk::~ImportLockDialogGtk() {} |
67 | 67 |
68 void ImportLockDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { | 68 void ImportLockDialogGtk::OnResponse(GtkWidget* dialog, int response_id) { |
69 MessageLoop::current()->PostTask( | 69 base::MessageLoop::current()->PostTask( |
70 FROM_HERE, | 70 FROM_HERE, |
71 base::Bind(callback_, response_id == GTK_RESPONSE_ACCEPT)); | 71 base::Bind(callback_, response_id == GTK_RESPONSE_ACCEPT)); |
72 gtk_widget_destroy(dialog_); | 72 gtk_widget_destroy(dialog_); |
73 delete this; | 73 delete this; |
74 } | 74 } |
OLD | NEW |