Introduce CefString and cef_string_t implementations that support string type conversions and customization of the API string type (issue #146).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@145 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2010-11-22 17:49:46 +00:00
parent 1e1c2ad8d7
commit 7d60642638
121 changed files with 2598 additions and 3209 deletions

View File

@ -8,7 +8,6 @@
#import <Cocoa/Cocoa.h>
#include "base/sys_string_conversions.h"
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
@ -198,7 +197,7 @@ void BrowserWebViewDelegate::DidMovePlugin(
void BrowserWebViewDelegate::ShowJavaScriptAlert(
WebKit::WebFrame* webframe, const std::wstring& message) {
NSString *text =
[NSString stringWithUTF8String:WideToUTF8(message).c_str()];
[NSString stringWithUTF8String:(std::string(message).c_str())];
NSAlert *alert = [NSAlert alertWithMessageText:@"JavaScript Alert"
defaultButton:@"OK"
alternateButton:nil
@ -234,7 +233,7 @@ bool BrowserWebViewDelegate::ShowFileChooser(std::vector<FilePath>& file_names,
/*
void BrowserWebViewDelegate::SetPageTitle(const std::wstring& title) {
[[browser_->GetWebViewHost()->view_handle() window]
setTitle:[NSString stringWithUTF8String:WideToUTF8(title).c_str()]];
setTitle:[NSString stringWithUTF8String:(std::string(title).c_str())]];
}
void BrowserWebViewDelegate::SetAddressBarURL(const GURL& url) {