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

Side by Side Diff: webkit/tools/test_shell/mac/test_webview_delegate.mm

Issue 8983009: Remove more wstrings in webkit/tools/test_shell. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 11 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "webkit/tools/test_shell/test_webview_delegate.h" 5 #include "webkit/tools/test_shell/test_webview_delegate.h"
6 6
7 #import <Cocoa/Cocoa.h> 7 #import <Cocoa/Cocoa.h>
8 #include "base/sys_string_conversions.h" 8 #include "base/sys_string_conversions.h"
9 #include "base/utf_string_conversions.h" 9 #include "base/utf_string_conversions.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 } 198 }
199 199
200 // Public methods ------------------------------------------------------------- 200 // Public methods -------------------------------------------------------------
201 201
202 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) { 202 void TestWebViewDelegate::UpdateSelectionClipboard(bool is_empty_selection) {
203 // No selection clipboard on mac, do nothing. 203 // No selection clipboard on mac, do nothing.
204 } 204 }
205 205
206 // Private methods ------------------------------------------------------------ 206 // Private methods ------------------------------------------------------------
207 207
208 void TestWebViewDelegate::ShowJavaScriptAlert(const std::wstring& message) { 208 void TestWebViewDelegate::ShowJavaScriptAlert(const string16& message) {
209 NSString *text = 209 NSString *text =
210 [NSString stringWithUTF8String:WideToUTF8(message).c_str()]; 210 [NSString stringWithUTF8String:UTF16ToUTF8(message).c_str()];
211 NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert" 211 NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert"
212 defaultButton:@"OK" 212 defaultButton:@"OK"
213 alternateButton:nil 213 alternateButton:nil
214 otherButton:nil 214 otherButton:nil
215 informativeTextWithFormat:text]; 215 informativeTextWithFormat:text];
216 [alert runModal]; 216 [alert runModal];
217 } 217 }
218 218
219 void TestWebViewDelegate::SetPageTitle(const string16& title) { 219 void TestWebViewDelegate::SetPageTitle(const string16& title) {
220 [[shell_->webViewHost()->view_handle() window] 220 [[shell_->webViewHost()->view_handle() window]
221 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]]; 221 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]];
222 } 222 }
223 223
224 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 224 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
225 const char* frameURL = url.spec().c_str(); 225 const char* frameURL = url.spec().c_str();
226 NSString *address = [NSString stringWithUTF8String:frameURL]; 226 NSString *address = [NSString stringWithUTF8String:frameURL];
227 [shell_->editWnd() setStringValue:address]; 227 [shell_->editWnd() setStringValue:address];
228 } 228 }
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/layout_test_controller.cc ('k') | webkit/tools/test_shell/test_shell_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698