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

Side by Side Diff: webkit/tools/test_shell/test_webview_delegate_mac.mm

Issue 10831108: mac: Fix a few compile errors with the 10.8 SDK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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 #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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 262
263 // Private methods ------------------------------------------------------------ 263 // Private methods ------------------------------------------------------------
264 264
265 void TestWebViewDelegate::ShowJavaScriptAlert(const string16& message) { 265 void TestWebViewDelegate::ShowJavaScriptAlert(const string16& message) {
266 NSString *text = 266 NSString *text =
267 [NSString stringWithUTF8String:UTF16ToUTF8(message).c_str()]; 267 [NSString stringWithUTF8String:UTF16ToUTF8(message).c_str()];
268 NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert" 268 NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert"
269 defaultButton:@"OK" 269 defaultButton:@"OK"
270 alternateButton:nil 270 alternateButton:nil
271 otherButton:nil 271 otherButton:nil
272 informativeTextWithFormat:text]; 272 informativeTextWithFormat:@"%@", text];
Robert Sesek 2012/08/01 15:22:30 Why this change?
Avi (use Gerrit) 2012/08/01 15:25:29 Because the call is "format", so you need a format
Nico 2012/08/01 15:39:19 Right. The 10.8 headers probably add __attribute__
273 [alert runModal]; 273 [alert runModal];
274 } 274 }
275 275
276 void TestWebViewDelegate::SetPageTitle(const string16& title) { 276 void TestWebViewDelegate::SetPageTitle(const string16& title) {
277 [[shell_->webViewHost()->view_handle() window] 277 [[shell_->webViewHost()->view_handle() window]
278 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]]; 278 setTitle:[NSString stringWithUTF8String:UTF16ToUTF8(title).c_str()]];
279 } 279 }
280 280
281 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) { 281 void TestWebViewDelegate::SetAddressBarURL(const GURL& url) {
282 const char* frameURL = url.spec().c_str(); 282 const char* frameURL = url.spec().c_str();
283 NSString *address = [NSString stringWithUTF8String:frameURL]; 283 NSString *address = [NSString stringWithUTF8String:frameURL];
284 [shell_->editWnd() setStringValue:address]; 284 [shell_->editWnd() setStringValue:address];
285 } 285 }
OLDNEW
« webkit/tools/test_shell/test_shell_mac.mm ('K') | « webkit/tools/test_shell/test_shell_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698