summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/context_menu_client_impl.cc9
-rw-r--r--webkit/glue/webview.h4
-rw-r--r--webkit/glue/webview_delegate.h3
-rw-r--r--webkit/glue/webview_impl.cc9
-rw-r--r--webkit/glue/webview_impl.h4
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.cc2
-rw-r--r--webkit/tools/test_shell/test_webview_delegate.h2
7 files changed, 16 insertions, 17 deletions
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc
index 03e32f5..58f2e78 100644
--- a/webkit/glue/context_menu_client_impl.cc
+++ b/webkit/glue/context_menu_client_impl.cc
@@ -159,7 +159,7 @@ WebCore::PlatformMenuDescription
GURL frame_url;
GURL page_url;
- std::string frame_encoding;
+ std::wstring frame_encoding;
// Send the frame and page URLs in any case.
ContextNode::Type frame_type = ContextNode::NONE;
ContextNode::Type page_type =
@@ -170,8 +170,8 @@ WebCore::PlatformMenuDescription
frame_type = GetTypeAndURLFromFrame(selected_frame,
&frame_url,
ContextNode::FRAME);
- frame_encoding = WideToUTF8(
- webkit_glue::StringToStdWString(selected_frame->loader()->encoding()));
+ frame_encoding = webkit_glue::StringToStdWString(
+ selected_frame->loader()->encoding());
}
if (type == ContextNode::NONE) {
@@ -222,8 +222,7 @@ WebCore::PlatformMenuDescription
frame_url,
selection_text_string,
misspelled_word_string,
- edit_flags,
- frame_encoding);
+ edit_flags);
}
return NULL;
}
diff --git a/webkit/glue/webview.h b/webkit/glue/webview.h
index bbb13f1..bd13a701 100644
--- a/webkit/glue/webview.h
+++ b/webkit/glue/webview.h
@@ -144,10 +144,10 @@ class WebView : public WebWidget {
// Set the encoding of the current main frame. The value comes from
// the encoding menu. WebKit uses the function named
// SetCustomTextEncodingName to do override encoding job.
- virtual void SetPageEncoding(const std::string& encoding_name) = 0;
+ virtual void SetPageEncoding(const std::wstring& encoding_name) = 0;
// Return the canonical encoding name of current main webframe in webview.
- virtual std::string GetMainFrameEncodingName() = 0;
+ virtual std::wstring GetMainFrameEncodingName() = 0;
// Change the text zoom level. Text size is made 20% larger or smaller.
virtual void MakeTextLarger() = 0;
diff --git a/webkit/glue/webview_delegate.h b/webkit/glue/webview_delegate.h
index 3a29889..6a3f9df 100644
--- a/webkit/glue/webview_delegate.h
+++ b/webkit/glue/webview_delegate.h
@@ -541,8 +541,7 @@ class WebViewDelegate : virtual public WebWidgetDelegate {
const GURL& frame_url,
const std::wstring& selection_text,
const std::wstring& misspelled_word,
- int edit_flags,
- const std::string& frame_encoding) {
+ int edit_flags) {
}
// Starts a drag session with the supplied contextual information.
diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc
index 5b012db..5c0b490 100644
--- a/webkit/glue/webview_impl.cc
+++ b/webkit/glue/webview_impl.cc
@@ -35,6 +35,7 @@
#pragma warning(push, 0)
#include "Cursor.h"
#include "Document.h"
+#include "DocumentLoader.h"
#include "DragController.h"
#include "DragData.h"
#include "Editor.h"
@@ -1143,7 +1144,7 @@ const WebPreferences& WebViewImpl::GetPreferences() {
// Set the encoding of the current main frame to the one selected by
// a user in the encoding menu.
-void WebViewImpl::SetPageEncoding(const std::string& encoding_name) {
+void WebViewImpl::SetPageEncoding(const std::wstring& encoding_name) {
if (!main_frame_)
return;
@@ -1155,12 +1156,12 @@ void WebViewImpl::SetPageEncoding(const std::string& encoding_name) {
}
// Return the canonical encoding name of current main webframe in webview.
-std::string WebViewImpl::GetMainFrameEncodingName() {
+std::wstring WebViewImpl::GetMainFrameEncodingName() {
if (!main_frame_)
- return std::string();
+ return std::wstring(L"");
String encoding_name = main_frame_->frame()->loader()->encoding();
- return WideToUTF8(webkit_glue::StringToStdWString(encoding_name));
+ return std::wstring(encoding_name.charactersWithNullTermination());
}
void WebViewImpl::MakeTextLarger() {
diff --git a/webkit/glue/webview_impl.h b/webkit/glue/webview_impl.h
index 837aed1..31be2ff 100644
--- a/webkit/glue/webview_impl.h
+++ b/webkit/glue/webview_impl.h
@@ -78,8 +78,8 @@ class WebViewImpl : public WebView,
virtual bool DownloadImage(int id, const GURL& image_url, int image_size);
virtual void SetPreferences(const WebPreferences& preferences);
virtual const WebPreferences& GetPreferences();
- virtual void SetPageEncoding(const std::string& encoding_name);
- virtual std::string GetMainFrameEncodingName();
+ virtual void SetPageEncoding(const std::wstring& encoding_name);
+ virtual std::wstring GetMainFrameEncodingName();
virtual void MakeTextLarger();
virtual void MakeTextSmaller();
virtual void MakeTextStandardSize();
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 2737ed6..c944a09 100644
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -487,7 +487,7 @@ void TestWebViewDelegate::ShowContextMenu(WebView* webview,
const std::wstring& selection_text,
const std::wstring& misspelled_word,
int edit_flags,
- const std::string& frame_encoding) {
+ const std::wstring& frame_encoding) {
CapturedContextMenuEvent context(type, x, y);
captured_context_menu_events_.push_back(context);
}
diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h
index a9ba5c9..d8277a4 100644
--- a/webkit/tools/test_shell/test_webview_delegate.h
+++ b/webkit/tools/test_shell/test_webview_delegate.h
@@ -101,7 +101,7 @@ class TestWebViewDelegate : public base::RefCounted<TestWebViewDelegate>,
const std::wstring& selection_text,
const std::wstring& misspelled_word,
int edit_flags,
- const std::string& frame_encoding);
+ const std::wstring& frame_encoding);
virtual void DidStartProvisionalLoadForFrame(
WebView* webview,
WebFrame* frame,