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

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

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
« no previous file with comments | « content/test/test_tab_contents_view.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 NSString *text = 209 NSString *text =
210 [NSString stringWithUTF8String:WideToUTF8(message).c_str()]; 210 [NSString stringWithUTF8String:WideToUTF8(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 std::wstring& title) { 219 void TestWebViewDelegate::SetPageTitle(const string16& title) {
220 [[shell_->webViewHost()->view_handle() window] 220 [[shell_->webViewHost()->view_handle() window]
221 setTitle:[NSString stringWithUTF8String:WideToUTF8(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 | « content/test/test_tab_contents_view.cc ('k') | webkit/tools/test_shell/test_webview_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698