Chromium Code Reviews| 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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 358 return m_menubarVisible; | 358 return m_menubarVisible; |
| 359 } | 359 } |
| 360 | 360 |
| 361 void ChromeClientImpl::setResizable(bool value) | 361 void ChromeClientImpl::setResizable(bool value) |
| 362 { | 362 { |
| 363 m_resizable = value; | 363 m_resizable = value; |
| 364 } | 364 } |
| 365 | 365 |
| 366 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url) | 366 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url) |
| 367 { | 367 { |
| 368 return m_webView->client() && m_webView->client()->shouldReportDetailedMessa geForSource(url); | 368 WebFrameImpl* webframe = m_webView->mainFrameImpl(); |
| 369 // TODO(mkosiba): remove once Chrome side is updated. | |
| 370 bool shouldReport = m_webView->client() && m_webView->client()->shouldReport DetailedMessageForSource(url); | |
| 371 shouldReport &= webframe->client() && webframe->client()->shouldReportDetail edMessageForSource(url); | |
| 372 return shouldReport; | |
| 369 } | 373 } |
| 370 | 374 |
| 371 void ChromeClientImpl::addMessageToConsole(MessageSource source, MessageLevel le vel, const String& message, unsigned lineNumber, const String& sourceID, const S tring& stackTrace) | 375 void ChromeClientImpl::addMessageToConsole(MessageSource source, MessageLevel le vel, const String& message, unsigned lineNumber, const String& sourceID, const S tring& stackTrace) |
| 372 { | 376 { |
| 377 WebFrameImpl* webframe = m_webView->mainFrameImpl(); | |
|
jochen (gone - plz use gerrit)
2014/03/31 10:03:05
would be nice if this was the frame the message wa
mkosiba (inactive)
2014/03/31 11:21:55
mm.. the PageConsole is a bit tricky. What do I do
jochen (gone - plz use gerrit)
2014/03/31 11:25:51
why would the rootFrame be the right frame?
I mea
| |
| 378 if (webframe->client()) { | |
| 379 webframe->client()->didAddMessageToConsole( | |
| 380 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess age), | |
| 381 sourceID, | |
| 382 lineNumber, | |
| 383 stackTrace); | |
| 384 } | |
| 385 // TODO(mkosiba): remove once Chrome side is updated. | |
| 373 if (m_webView->client()) { | 386 if (m_webView->client()) { |
| 374 m_webView->client()->didAddMessageToConsole( | 387 m_webView->client()->didAddMessageToConsole( |
| 375 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess age), | 388 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess age), |
| 376 sourceID, | 389 sourceID, |
| 377 lineNumber, | 390 lineNumber, |
| 378 stackTrace); | 391 stackTrace); |
| 379 } | 392 } |
| 380 } | 393 } |
| 381 | 394 |
| 382 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() | 395 bool ChromeClientImpl::canRunBeforeUnloadConfirmPanel() |
| (...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 961 { | 974 { |
| 962 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); | 975 return static_cast<NavigatorContentUtilsClient::CustomHandlersState>(m_webVi ew->client()->isProtocolHandlerRegistered(scheme, baseURL, url)); |
| 963 } | 976 } |
| 964 | 977 |
| 965 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) | 978 void NavigatorContentUtilsClientImpl::unregisterProtocolHandler(const String& sc heme, const WebCore::KURL& baseURL, const WebCore::KURL& url) |
| 966 { | 979 { |
| 967 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); | 980 m_webView->client()->unregisterProtocolHandler(scheme, baseURL, url); |
| 968 } | 981 } |
| 969 | 982 |
| 970 } // namespace blink | 983 } // namespace blink |
| OLD | NEW |