OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 } | 242 } |
243 | 243 |
244 | 244 |
245 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource
source, MessageLevel level, const String& message, unsigned lineNumber, const S
tring& sourceID, const String& stackTrace) | 245 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource
source, MessageLevel level, const String& message, unsigned lineNumber, const S
tring& sourceID, const String& stackTrace) |
246 { | 246 { |
247 | 247 |
248 if (level == ErrorMessageLevel) | 248 if (level == ErrorMessageLevel) |
249 printf("ERROR: %s \nSOURCE: %s:%u\n", message.utf8().data(), sourceID.ut
f8().data(), lineNumber); | 249 printf("ERROR: %s \nSOURCE: %s:%u\n", message.utf8().data(), sourceID.ut
f8().data(), lineNumber); |
250 else | 250 else |
251 printf("CONSOLE: %s: %s\n", messageLevelAsString(level).utf8().data(), m
essage.utf8().data()); | 251 printf("CONSOLE: %s: %s\n", messageLevelAsString(level).utf8().data(), m
essage.utf8().data()); |
| 252 fflush(stdout); |
252 | 253 |
253 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame); | 254 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame); |
254 if (frame && frame->client()) { | 255 if (frame && frame->client()) { |
255 frame->client()->didAddMessageToConsole( | 256 frame->client()->didAddMessageToConsole( |
256 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess
age), | 257 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess
age), |
257 sourceID, | 258 sourceID, |
258 lineNumber, | 259 lineNumber, |
259 stackTrace); | 260 stackTrace); |
260 } | 261 } |
261 } | 262 } |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 webFrame->client()->forwardInputEvent(&webEvent); | 404 webFrame->client()->forwardInputEvent(&webEvent); |
404 } else if (event->isWheelEvent()) { | 405 } else if (event->isWheelEvent()) { |
405 WebMouseWheelEventBuilder webEvent(webFrame->frameView(), 0, *static_cas
t<WheelEvent*>(event)); | 406 WebMouseWheelEventBuilder webEvent(webFrame->frameView(), 0, *static_cas
t<WheelEvent*>(event)); |
406 if (webEvent.type == WebInputEvent::Undefined) | 407 if (webEvent.type == WebInputEvent::Undefined) |
407 return; | 408 return; |
408 webFrame->client()->forwardInputEvent(&webEvent); | 409 webFrame->client()->forwardInputEvent(&webEvent); |
409 } | 410 } |
410 } | 411 } |
411 | 412 |
412 } // namespace blink | 413 } // namespace blink |
OLD | NEW |