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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate_gtk.cc

Issue 7915008: wstring: convert all SetPageTitle APIs to use string16 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // This file was forked off the Mac port. 5 // This file was forked off the Mac port.
6 6
7 #include "webkit/tools/test_shell/test_webview_delegate.h" 7 #include "webkit/tools/test_shell/test_webview_delegate.h"
8 8
9 #include <gtk/gtk.h> 9 #include <gtk/gtk.h>
10 #include <gdk/gdkx.h> 10 #include <gdk/gdkx.h>
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 253
254 void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) { 254 void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) {
255 GtkWidget* dialog = gtk_message_dialog_new( 255 GtkWidget* dialog = gtk_message_dialog_new(
256 shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, 256 shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
257 GTK_BUTTONS_OK, "%s", WideToUTF8(message).c_str()); 257 GTK_BUTTONS_OK, "%s", WideToUTF8(message).c_str());
258 gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert"); 258 gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert");
259 gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop. 259 gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
260 gtk_widget_destroy(dialog); 260 gtk_widget_destroy(dialog);
261 } 261 }
262 262
263 void TestWebViewDelegate::SetPageTitle(const std::wstring& title) { 263 void TestWebViewDelegate::SetPageTitle(const string16& title) {
264 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 264 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
265 ("Test Shell - " + WideToUTF8(title)).c_str()); 265 ("Test Shell - " + UTF16ToUTF8(title)).c_str());
266 } 266 }
267 267
268 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 268 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
269 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 269 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
270 } 270 }
OLDNEW
« 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