Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Unified Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 196128: Hook up WebViewClient, part 1.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
« no previous file with comments | « webkit/tools/test_shell/test_webview_delegate.cc ('k') | webkit/tools/test_shell/test_webview_delegate_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698