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

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

Issue 13219005: Replace string16 with base::string16 in src/webkit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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) 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 // 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 <gdk/gdkx.h> 9 #include <gdk/gdkx.h>
10 #include <gtk/gtk.h> 10 #include <gtk/gtk.h>
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 &num_targets); 239 &num_targets);
240 gtk_clipboard_set_with_data(clipboard, targets, num_targets, 240 gtk_clipboard_set_with_data(clipboard, targets, num_targets,
241 SelectionClipboardGetContents, NULL, 241 SelectionClipboardGetContents, NULL,
242 shell_->webView()); 242 shell_->webView());
243 gtk_target_list_unref(target_list); 243 gtk_target_list_unref(target_list);
244 gtk_target_table_free(targets, num_targets); 244 gtk_target_table_free(targets, num_targets);
245 } 245 }
246 246
247 // Private methods ------------------------------------------------------------ 247 // Private methods ------------------------------------------------------------
248 248
249 void TestWebViewDelegate::ShowJavaScriptAlert(const string16& message) { 249 void TestWebViewDelegate::ShowJavaScriptAlert(const base::string16& message) {
250 GtkWidget* dialog = gtk_message_dialog_new( 250 GtkWidget* dialog = gtk_message_dialog_new(
251 shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, 251 shell_->mainWnd(), GTK_DIALOG_MODAL, GTK_MESSAGE_INFO,
252 GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str()); 252 GTK_BUTTONS_OK, "%s", UTF16ToUTF8(message).c_str());
253 gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert"); 253 gtk_window_set_title(GTK_WINDOW(dialog), "JavaScript Alert");
254 gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop. 254 gtk_dialog_run(GTK_DIALOG(dialog)); // Runs a nested message loop.
255 gtk_widget_destroy(dialog); 255 gtk_widget_destroy(dialog);
256 } 256 }
257 257
258 void TestWebViewDelegate::SetPageTitle(const string16& title) { 258 void TestWebViewDelegate::SetPageTitle(const base::string16& title) {
259 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()), 259 gtk_window_set_title(GTK_WINDOW(shell_->mainWnd()),
260 ("Test Shell - " + UTF16ToUTF8(title)).c_str()); 260 ("Test Shell - " + UTF16ToUTF8(title)).c_str());
261 } 261 }
262 262
263 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 263 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
264 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str()); 264 gtk_entry_set_text(GTK_ENTRY(shell_->editWnd()), url.spec().c_str());
265 } 265 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698