| Index: webkit/tools/test_shell/test_webview_delegate_gtk.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/test_webview_delegate_gtk.cc (revision 26230)
|
| +++ webkit/tools/test_shell/test_webview_delegate_gtk.cc (working copy)
|
| @@ -36,7 +36,9 @@
|
| using WebKit::WebCursorInfo;
|
| using WebKit::WebFrame;
|
| using WebKit::WebNavigationPolicy;
|
| +using WebKit::WebPopupMenuInfo;
|
| using WebKit::WebRect;
|
| +using WebKit::WebWidget;
|
|
|
| namespace {
|
|
|
| @@ -82,15 +84,12 @@
|
|
|
| } // namespace
|
|
|
| -// WebViewDelegate ------------------------------------------------------------
|
| +// WebViewClient --------------------------------------------------------------
|
|
|
| -void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
|
| - GtkWidget* dialog = gtk_message_dialog_new(
|
| - shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
|
| - GTK_BUTTONS_OK, "%s", WideToUTF8(message).c_str());
|
| - gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert");
|
| - gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
|
| - gtk_widget_destroy(dialog);
|
| +WebWidget* TestWebViewDelegate::createPopupMenu(
|
| + const WebPopupMenuInfo& info) {
|
| + NOTREACHED();
|
| + return NULL;
|
| }
|
|
|
| // WebWidgetClient ------------------------------------------------------------
|
| @@ -261,6 +260,15 @@
|
|
|
| // Private methods ------------------------------------------------------------
|
|
|
| +void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
|
| + GtkWidget* dialog = gtk_message_dialog_new(
|
| + shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
|
| + GTK_BUTTONS_OK, "%s", WideToUTF8(message).c_str());
|
| + gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert");
|
| + gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
|
| + gtk_widget_destroy(dialog);
|
| +}
|
| +
|
| void TestWebViewDelegate::SetPageTitle(const std::wstring& title) {
|
| gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
|
| ("Test Shell - " + WideToUTF8(title)).c_str());
|
|
|