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/app_modal_dialog.h" | 5 #include "chrome/browser/app_modal_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
| 9 #include "app/l10n_util.h" |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/string_util.h" | 11 #include "base/string_util.h" |
11 #include "chrome/browser/tab_contents/tab_contents.h" | 12 #include "chrome/browser/tab_contents/tab_contents.h" |
12 #include "chrome/browser/tab_contents/tab_contents_view.h" | 13 #include "chrome/browser/tab_contents/tab_contents_view.h" |
13 #include "chrome/common/l10n_util.h" | |
14 #include "chrome/common/message_box_flags.h" | 14 #include "chrome/common/message_box_flags.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 // If there's a text entry in the dialog, get the text from the first one and | 19 // If there's a text entry in the dialog, get the text from the first one and |
20 // return it. | 20 // return it. |
21 std::wstring GetPromptText(GtkDialog* dialog) { | 21 std::wstring GetPromptText(GtkDialog* dialog) { |
22 std::wstring text; | 22 std::wstring text; |
23 // TODO(tc): Replace with gtk_dialog_get_content_area() when using GTK 2.14+ | 23 // TODO(tc): Replace with gtk_dialog_get_content_area() when using GTK 2.14+ |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 } | 142 } |
143 } | 143 } |
144 | 144 |
145 void AppModalDialog::AcceptWindow() { | 145 void AppModalDialog::AcceptWindow() { |
146 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_OK, this); | 146 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_OK, this); |
147 } | 147 } |
148 | 148 |
149 void AppModalDialog::CancelWindow() { | 149 void AppModalDialog::CancelWindow() { |
150 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_CANCEL, this); | 150 OnDialogResponse(GTK_DIALOG(dialog_), GTK_RESPONSE_CANCEL, this); |
151 } | 151 } |
OLD | NEW |