summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webframe_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-31 23:30:59 +0000
commit0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8 (patch)
tree1ad235e23d71bb494c8b67588b2798f713810cdd /webkit/glue/webframe_impl.cc
parentc90e16ce1fbc9abc1a1a58766e0418263ed28a84 (diff)
downloadchromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.zip
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.gz
chromium_src-0dea3ea8bee2b135b079d8b75c9e9fb7f2fa82a8.tar.bz2
Use WebConsoleMessage instead of ConsoleMessageLevel.
R=dglazkov Review URL: http://codereview.chromium.org/57073 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12916 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webframe_impl.cc')
-rw-r--r--webkit/glue/webframe_impl.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc
index d33b45f..6a29ded 100644
--- a/webkit/glue/webframe_impl.cc
+++ b/webkit/glue/webframe_impl.cc
@@ -135,6 +135,7 @@ MSVC_POP_WARNING();
#include "net/base/net_errors.h"
#include "skia/ext/bitmap_platform_device.h"
#include "skia/ext/platform_canvas.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindInPageRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "webkit/glue/alt_error_page_resource_fetcher.h"
@@ -193,6 +194,7 @@ using WebCore::SubstituteData;
using WebCore::TextIterator;
using WebCore::VisiblePosition;
using WebCore::XPathResult;
+using WebKit::WebConsoleMessage;
using WebKit::WebFindInPageRequest;
using WebKit::WebScriptSource;
@@ -1815,22 +1817,21 @@ bool WebFrameImpl::IsCoreCommandEnabled(const std::string& name) {
.isEnabled();
}
-void WebFrameImpl::AddMessageToConsole(const std::wstring& msg,
- ConsoleMessageLevel level) {
+void WebFrameImpl::AddMessageToConsole(const WebConsoleMessage& message) {
ASSERT(frame());
WebCore::MessageLevel webcore_message_level;
- switch (level) {
- case MESSAGE_LEVEL_TIP:
+ switch (message.level) {
+ case WebConsoleMessage::LevelTip:
webcore_message_level = WebCore::TipMessageLevel;
break;
- case MESSAGE_LEVEL_LOG:
+ case WebConsoleMessage::LevelLog:
webcore_message_level = WebCore::LogMessageLevel;
break;
- case MESSAGE_LEVEL_WARNING:
+ case WebConsoleMessage::LevelWarning:
webcore_message_level = WebCore::WarningMessageLevel;
break;
- case MESSAGE_LEVEL_ERROR:
+ case WebConsoleMessage::LevelError:
webcore_message_level = WebCore::ErrorMessageLevel;
break;
default:
@@ -1840,7 +1841,7 @@ void WebFrameImpl::AddMessageToConsole(const std::wstring& msg,
frame()->domWindow()->console()->addMessage(
WebCore::OtherMessageSource, webcore_message_level,
- webkit_glue::StdWStringToString(msg), 1, String());
+ webkit_glue::WebStringToString(message.text), 1, String());
}
void WebFrameImpl::ClosePage() {