OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/shell/shell_javascript_dialog.h" | 5 #include "content/shell/browser/shell_javascript_dialog.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
11 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
12 #include "content/shell/app/resource.h" | 12 #include "content/shell/app/resource.h" |
13 #include "content/shell/shell.h" | 13 #include "content/shell/browser/shell.h" |
14 #include "content/shell/shell_javascript_dialog_manager.h" | 14 #include "content/shell/browser/shell_javascript_dialog_manager.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 const char kPromptTextId[] = "content_shell_prompt_text"; | 18 const char kPromptTextId[] = "content_shell_prompt_text"; |
19 | 19 |
20 // If there's a text entry in the dialog, get the text from the first one and | 20 // If there's a text entry in the dialog, get the text from the first one and |
21 // return it. | 21 // return it. |
22 string16 GetPromptText(GtkDialog* dialog) { | 22 string16 GetPromptText(GtkDialog* dialog) { |
23 GtkWidget* widget = static_cast<GtkWidget*>( | 23 GtkWidget* widget = static_cast<GtkWidget*>( |
24 g_object_get_data(G_OBJECT(dialog), kPromptTextId)); | 24 g_object_get_data(G_OBJECT(dialog), kPromptTextId)); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 default: | 118 default: |
119 NOTREACHED(); | 119 NOTREACHED(); |
120 } | 120 } |
121 | 121 |
122 gtk_widget_destroy(dialog); | 122 gtk_widget_destroy(dialog); |
123 | 123 |
124 manager_->DialogClosed(this); | 124 manager_->DialogClosed(this); |
125 } | 125 } |
126 | 126 |
127 } // namespace content | 127 } // namespace content |
OLD | NEW |